Re: [PATCH v8 3/7] mm, devm_memremap_pages: Fix shutdown handling

2019-02-11 Thread Jerome Glisse
On Sun, Feb 10, 2019 at 12:09:08PM +0100, Krzysztof Grygiencz wrote: > Dear Sir, > > I'm using ArchLinux distribution. After kernel upgrade form 4.19.14 to > 4.19.15 my X environment stopped working. I have AMD HD3300 (RS780D) > graphics card. I have bisected kernel and found a failing commit: >

Re: [PATCH v8 3/7] mm, devm_memremap_pages: Fix shutdown handling

2019-02-11 Thread Krzysztof Grygiencz
Dear Sir, I'm using ArchLinux distribution. After kernel upgrade form 4.19.14 to 4.19.15 my X environment stopped working. I have AMD HD3300 (RS780D) graphics card. I have bisected kernel and found a failing commit: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v4

Re: [PATCH v8 3/7] mm, devm_memremap_pages: Fix shutdown handling

2018-12-02 Thread Logan Gunthorpe
On 2018-11-30 3:28 p.m., Dan Williams wrote: > On Fri, Nov 30, 2018 at 2:19 PM Logan Gunthorpe wrote: >> >> Hey, >> >> On 2018-11-29 11:51 a.m., Dan Williams wrote: >>> Got it, let me see how bad moving arch_remove_memory() turns out, >>> sounds like a decent approach to coordinate multiple user

Re: [PATCH v8 3/7] mm, devm_memremap_pages: Fix shutdown handling

2018-12-02 Thread Logan Gunthorpe
Hey, On 2018-11-29 11:51 a.m., Dan Williams wrote: > Got it, let me see how bad moving arch_remove_memory() turns out, > sounds like a decent approach to coordinate multiple users of a single > ref. I've put together a patch set[1] that fixes all the users of devm_memremap_pages() without moving

Re: [PATCH v8 3/7] mm, devm_memremap_pages: Fix shutdown handling

2018-11-30 Thread Dan Williams
On Fri, Nov 30, 2018 at 2:34 PM Logan Gunthorpe wrote: > > > > On 2018-11-30 3:28 p.m., Dan Williams wrote: > > On Fri, Nov 30, 2018 at 2:19 PM Logan Gunthorpe wrote: > >> > >> Hey, > >> > >> On 2018-11-29 11:51 a.m., Dan Williams wrote: > >>> Got it, let me see how bad moving arch_remove_memory(

Re: [PATCH v8 3/7] mm, devm_memremap_pages: Fix shutdown handling

2018-11-30 Thread Dan Williams
On Fri, Nov 30, 2018 at 2:19 PM Logan Gunthorpe wrote: > > Hey, > > On 2018-11-29 11:51 a.m., Dan Williams wrote: > > Got it, let me see how bad moving arch_remove_memory() turns out, > > sounds like a decent approach to coordinate multiple users of a single > > ref. > > I've put together a patch

Re: [PATCH v8 3/7] mm, devm_memremap_pages: Fix shutdown handling

2018-11-30 Thread Logan Gunthorpe
On 2018-11-28 8:10 p.m., Dan Williams wrote: > Yes, please send a proper patch. Ok, I'll send one shortly. > Although, I'm still not sure I see > the problem with the order of the percpu-ref kill. It's likely more > efficient to put the kill after the put_page() loop because the > percpu-ref w

Re: [PATCH v8 3/7] mm, devm_memremap_pages: Fix shutdown handling

2018-11-30 Thread Logan Gunthorpe
On 2018-11-29 10:30 a.m., Dan Williams wrote: > Oh! Yes, nice find. We need to wait for the percpu-ref to be dead and > all outstanding references dropped before we can proceed to > arch_remove_memory(), and I think this problem has been there since > day one because the final exit was always aft

Re: [PATCH v8 3/7] mm, devm_memremap_pages: Fix shutdown handling

2018-11-29 Thread Dan Williams
On Thu, Nov 29, 2018 at 9:51 AM Logan Gunthorpe wrote: > > > > On 2018-11-29 10:30 a.m., Dan Williams wrote: > > Oh! Yes, nice find. We need to wait for the percpu-ref to be dead and > > all outstanding references dropped before we can proceed to > > arch_remove_memory(), and I think this problem

Re: [PATCH v8 3/7] mm, devm_memremap_pages: Fix shutdown handling

2018-11-29 Thread Dan Williams
On Thu, Nov 29, 2018 at 9:07 AM Logan Gunthorpe wrote: > > > > On 2018-11-28 8:10 p.m., Dan Williams wrote: > > Yes, please send a proper patch. > > Ok, I'll send one shortly. > > > Although, I'm still not sure I see > > the problem with the order of the percpu-ref kill. It's likely more > > effic

Re: [PATCH v8 3/7] mm, devm_memremap_pages: Fix shutdown handling

2018-11-28 Thread Dan Williams
On Tue, Nov 27, 2018 at 1:44 PM Logan Gunthorpe wrote: > > Hey Dan, > > On 2018-11-20 4:13 p.m., Dan Williams wrote: > > The last step before devm_memremap_pages() returns success is to > > allocate a release action, devm_memremap_pages_release(), to tear the > > entire setup down. However, the re

Re: [PATCH v8 3/7] mm, devm_memremap_pages: Fix shutdown handling

2018-11-28 Thread Logan Gunthorpe
Hey Dan, On 2018-11-20 4:13 p.m., Dan Williams wrote: > The last step before devm_memremap_pages() returns success is to > allocate a release action, devm_memremap_pages_release(), to tear the > entire setup down. However, the result from devm_add_action() is not > checked. > > Checking the error

[PATCH v8 3/7] mm, devm_memremap_pages: Fix shutdown handling

2018-11-20 Thread Dan Williams
The last step before devm_memremap_pages() returns success is to allocate a release action, devm_memremap_pages_release(), to tear the entire setup down. However, the result from devm_add_action() is not checked. Checking the error from devm_add_action() is not enough. The api currently relies on