mm: fix cache mode tracking in vm_insert_mixed() breaks AMDGPU [was: Re: Latest testing with drm-next-4.9-wip and latest LLVM/mesa stack - Regression in PowerPlay/DPM on CIK?]

Shawn Starr shawn.starr at rogers.com
Thu Oct 13 18:28:42 UTC 2016


Hello AMD folks,

I have discovered a problem in Linus master that affects AMDGPU, nobody would 
notice this in drm-next-4.9-wip since its not in this repo.


git bisect start
# good: [c8d2bc9bc39ebea8437fd974fdbc21847bb897a3] Linux 4.8
git bisect good c8d2bc9bc39ebea8437fd974fdbc21847bb897a3
# bad: [f29135b54bcbfe1fea97d94e2ae860bade1d5a31] Merge branch 'for-linus-4.9' 
of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
git bisect bad f29135b54bcbfe1fea97d94e2ae860bade1d5a31
# good: [5691f0e9a3e7855832d5fd094801bf600347c2d0] Merge tag 'sound-4.9-rc1' 
of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
git bisect good 5691f0e9a3e7855832d5fd094801bf600347c2d0
# good: [e89ac165a5ebd0a95650ed48d40b8b4e3a8991dc] staging: rts5208: fix 
comment blocks style in rtsx_chip.h
git bisect good e89ac165a5ebd0a95650ed48d40b8b4e3a8991dc
# good: [07021b43597f506cc525d139ed1a94e79cf184f2] Merge tag 'powerpc-4.9-1' 
of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
git bisect good 07021b43597f506cc525d139ed1a94e79cf184f2
# good: [c913fc4146ba7c280e074558d0a461e5c6f07c8a] Merge tag 'armsoc-late' of 
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
git bisect good c913fc4146ba7c280e074558d0a461e5c6f07c8a
# bad: [abb5a14fa20fdd400995926134b7be9eb8ce6048] Merge branch 'work.misc' of 
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
git bisect bad abb5a14fa20fdd400995926134b7be9eb8ce6048
# bad: [b9044ac8292fc94bee33f6f08acaed3ac55f0c75] Merge tag 'for-linus' of 
git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma
git bisect bad b9044ac8292fc94bee33f6f08acaed3ac55f0c75
# bad: [68ba0326b4e14988f9e0c24a6e12a85cf2acd1ca] proc: much faster /proc/
vmstat
git bisect bad 68ba0326b4e14988f9e0c24a6e12a85cf2acd1ca
# good: [1d8bf926f8739bd35d054097907fef35d881e403] mm/bootmem.c: replace 
kzalloc() by kzalloc_node()
git bisect good 1d8bf926f8739bd35d054097907fef35d881e403
# bad: [cc30c5d6461a2813406f7f84d581643781922a82] mm/page_io.c: replace some 
BUG_ON()s with VM_BUG_ON_PAGE()
git bisect bad cc30c5d6461a2813406f7f84d581643781922a82
# good: [6fcb52a56ff60d240f06296b12827e7f20d45f63] thp: reduce usage of huge 
zero page's atomic counter
git bisect good 6fcb52a56ff60d240f06296b12827e7f20d45f63
# bad: [d943649831aba0fcdda37a0e9e25b332a634cf5e] mm, compaction: more 
reliably increase direct compaction priority
git bisect bad d943649831aba0fcdda37a0e9e25b332a634cf5e
# bad: [87744ab3832b83ba71b931f86f9cfdb000d07da5] mm: fix cache mode tracking 
in vm_insert_mixed()
git bisect bad 87744ab3832b83ba71b931f86f9cfdb000d07da5
# good: [d66ba15bde22703b3c0cec6782519cb0765a6777] memory-hotplug: fix 
store_mem_state() return value
git bisect good d66ba15bde22703b3c0cec6782519cb0765a6777
# first bad commit: [87744ab3832b83ba71b931f86f9cfdb000d07da5] mm: fix cache 
mode tracking in vm_insert_mixed()

87744ab3832b83ba71b931f86f9cfdb000d07da5 is the first bad commit
commit 87744ab3832b83ba71b931f86f9cfdb000d07da5
Author: Dan Williams <dan.j.williams at intel.com>
Date:   Fri Oct 7 17:00:18 2016 -0700

    mm: fix cache mode tracking in vm_insert_mixed()
    
    vm_insert_mixed() unlike vm_insert_pfn_prot() and vmf_insert_pfn_pmd(),
    fails to check the pgprot_t it uses for the mapping against the one
    recorded in the memtype tracking tree.  Add the missing call to
    track_pfn_insert() to preclude cases where incompatible aliased mappings
    are established for a given physical address range.
    
    Link: http://lkml.kernel.org/r/
147328717909.35069.14256589123570653697.stgit at dwillia2-
desk3.amr.corp.intel.com
    Signed-off-by: Dan Williams <dan.j.williams at intel.com>
    Cc: David Airlie <airlied at linux.ie>
    Cc: Matthew Wilcox <mawilcox at microsoft.com>
    Cc: Ross Zwisler <ross.zwisler at linux.intel.com>
    Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>

:040000 040000 7517c0019fe49c1830b5a1d81f1dc099c5aab98a 
fd497a604a2af5995db2b8ed1e9c640bede6adf3 M      mm


Removal of this patch stops graphics stalls.

A friend of mine mentions,

"looks like a graphics thingy you depend on is requesting a mapping with a 
not-allowed cache mode, and now you are (rightfully) getting errors?"

Thanks,
Shawn



On Monday, October 10, 2016 7:36:28 PM EDT Shawn Starr wrote:
> On Monday, October 10, 2016 4:55:24 PM EDT Shawn Starr wrote:
> > Hello,
> > 
> > It turns out its not kernel, bisecting mesa/LLVM now to see where this
> > issue is happening from.
> 
> Correction, it is kernel, 4.8-rc8 is good from commit
> c2cbc38b9715bd8318062e600668fc30e5a3fbfa
> 
> Bisecting this now.
> 
> Thanks,
> Shawn




More information about the amd-gfx mailing list