Re: [BUG REPORT] [mm-hotplug, aio] aio ring_pages can't be offlined

2012-12-03 Thread Mel Gorman
On Mon, Dec 03, 2012 at 10:52:27AM +0800, Lin Feng wrote: > > > On 11/30/2012 07:00 PM, Mel Gorman wrote: > >> > >> Well, that's a fairly low-level implementation detail. A more typical > >> approach would be to add a new get_user_pages_non_movable() or such. > >> That would probably have the s

Re: [BUG REPORT] [mm-hotplug, aio] aio ring_pages can't be offlined

2012-12-02 Thread Lin Feng
On 11/30/2012 06:47 PM, Andrew Morton wrote: > On Fri, 30 Nov 2012 18:29:30 +0800 Lin Feng wrote: > >>> add a new library function which callers can use before (or after?) >>> calling get_user_pages[_fast](). >> Sorry, I'm not quite understand what "library function" function means.. >> Does it

Re: [BUG REPORT] [mm-hotplug, aio] aio ring_pages can't be offlined

2012-12-02 Thread Lin Feng
On 11/30/2012 07:00 PM, Mel Gorman wrote: >> >> Well, that's a fairly low-level implementation detail. A more typical >> approach would be to add a new get_user_pages_non_movable() or such. >> That would probably have the same signature as get_user_pages(), with >> one additional argument. The

Re: [BUG REPORT] [mm-hotplug, aio] aio ring_pages can't be offlined

2012-12-02 Thread Lin Feng
hi Domenico, Sorry for my late reply and thanks for your attention, see below :) On 11/30/2012 11:24 PM, Domenico Andreoli wrote: > On Thu, Nov 29, 2012 at 02:54:58PM +0800, Lin Feng wrote: >> Hi all, > > Hi Lin, > >> We encounter a "Resource temporarily unavailable" fail while trying >> to off

Re: [BUG REPORT] [mm-hotplug, aio] aio ring_pages can't be offlined

2012-11-30 Thread Domenico Andreoli
On Thu, Nov 29, 2012 at 02:54:58PM +0800, Lin Feng wrote: > Hi all, Hi Lin, > We encounter a "Resource temporarily unavailable" fail while trying > to offline a memory section in a movable zone. We found that there are > some pages can't be migrated. The offline operation fails in function > mi

Re: [BUG REPORT] [mm-hotplug, aio] aio ring_pages can't be offlined

2012-11-30 Thread Mel Gorman
On Thu, Nov 29, 2012 at 11:55:02PM -0800, Andrew Morton wrote: > On Fri, 30 Nov 2012 15:01:26 +0800 Lin Feng wrote: > > > > > > > On 11/30/2012 01:57 PM, Andrew Morton wrote: > > > On Fri, 30 Nov 2012 11:42:05 +0800 Lin Feng > > > wrote: > > > > > >> hi Andrew, > > >> > > >> On 11/30/2012 07

Re: [BUG REPORT] [mm-hotplug, aio] aio ring_pages can't be offlined

2012-11-30 Thread Mel Gorman
On Thu, Nov 29, 2012 at 03:39:30PM -0800, Andrew Morton wrote: > On Thu, 29 Nov 2012 14:54:58 +0800 > Lin Feng wrote: > > > Hi all, > > > > We encounter a "Resource temporarily unavailable" fail while trying > > to offline a memory section in a movable zone. We found that there are > > some pag

Re: [BUG REPORT] [mm-hotplug, aio] aio ring_pages can't be offlined

2012-11-30 Thread Andrew Morton
On Fri, 30 Nov 2012 18:29:30 +0800 Lin Feng wrote: > > add a new library function which callers can use before (or after?) > > calling get_user_pages[_fast](). > Sorry, I'm not quite understand what "library function" function means.. > Does it means a function aids get_user_pages() or totally wr

Re: [BUG REPORT] [mm-hotplug, aio] aio ring_pages can't be offlined

2012-11-30 Thread Lin Feng
On 11/30/2012 03:55 PM, Andrew Morton wrote: > On Fri, 30 Nov 2012 15:01:26 +0800 Lin Feng wrote: > >> >> >> On 11/30/2012 01:57 PM, Andrew Morton wrote: >>> On Fri, 30 Nov 2012 11:42:05 +0800 Lin Feng wrote: >>> hi Andrew, On 11/30/2012 07:39 AM, Andrew Morton wrote: > Tric

Re: [BUG REPORT] [mm-hotplug, aio] aio ring_pages can't be offlined

2012-11-30 Thread Andrew Morton
On Fri, 30 Nov 2012 16:13:16 +0900 Kamezawa Hiroyuki wrote: > > What about futexes? > > > > IIUC, futex's key is now a pair of (mm,address) or (inode, pgoff). > Then, get_user_page() in futex.c will release the page by put_page(). > 'struct page' is just touched by get_futex_key() to obtain pag

Re: [BUG REPORT] [mm-hotplug, aio] aio ring_pages can't be offlined

2012-11-29 Thread Andrew Morton
On Fri, 30 Nov 2012 15:01:26 +0800 Lin Feng wrote: > > > On 11/30/2012 01:57 PM, Andrew Morton wrote: > > On Fri, 30 Nov 2012 11:42:05 +0800 Lin Feng wrote: > > > >> hi Andrew, > >> > >> On 11/30/2012 07:39 AM, Andrew Morton wrote: > >>> Tricky. > >>> > >>> I expect the same problem would occ

Re: [BUG REPORT] [mm-hotplug, aio] aio ring_pages can't be offlined

2012-11-29 Thread Kamezawa Hiroyuki
(2012/11/30 14:57), Andrew Morton wrote: On Fri, 30 Nov 2012 11:42:05 +0800 Lin Feng wrote: hi Andrew, On 11/30/2012 07:39 AM, Andrew Morton wrote: Tricky. I expect the same problem would occur with pages which are under O_DIRECT I/O. Obviously O_DIRECT pages won't be pinned for such long

Re: [BUG REPORT] [mm-hotplug, aio] aio ring_pages can't be offlined

2012-11-29 Thread Lin Feng
On 11/30/2012 01:57 PM, Andrew Morton wrote: > On Fri, 30 Nov 2012 11:42:05 +0800 Lin Feng wrote: > >> hi Andrew, >> >> On 11/30/2012 07:39 AM, Andrew Morton wrote: >>> Tricky. >>> >>> I expect the same problem would occur with pages which are under >>> O_DIRECT I/O. Obviously O_DIRECT pages w

Re: [BUG REPORT] [mm-hotplug, aio] aio ring_pages can't be offlined

2012-11-29 Thread Andrew Morton
On Fri, 30 Nov 2012 11:42:05 +0800 Lin Feng wrote: > hi Andrew, > > On 11/30/2012 07:39 AM, Andrew Morton wrote: > > Tricky. > > > > I expect the same problem would occur with pages which are under > > O_DIRECT I/O. Obviously O_DIRECT pages won't be pinned for such long > > periods, but the du

Re: [BUG REPORT] [mm-hotplug, aio] aio ring_pages can't be offlined

2012-11-29 Thread Lin Feng
hi Andrew, On 11/30/2012 07:39 AM, Andrew Morton wrote: > Tricky. > > I expect the same problem would occur with pages which are under > O_DIRECT I/O. Obviously O_DIRECT pages won't be pinned for such long > periods, but the durations could still be lengthy (seconds). the offline retry timeout d

Re: [BUG REPORT] [mm-hotplug, aio] aio ring_pages can't be offlined

2012-11-29 Thread Lin Feng
Hi Zach, Thanks for your advice. So agree, I will look into it to lead aio to use non-movable pages. Thanks, linfeng On 11/30/2012 08:04 AM, Zach Brown wrote: >> The best I can think of is to make changes in or around >> get_user_pages(), to steal the pages from userspace and replace them >> wi

Re: [BUG REPORT] [mm-hotplug, aio] aio ring_pages can't be offlined

2012-11-29 Thread Zach Brown
> The best I can think of is to make changes in or around > get_user_pages(), to steal the pages from userspace and replace them > with non-movable ones before pinning them. The performance cost of > something like this would surely be unacceptable for direct-io, but > maybe OK for the aio ring an

Re: [BUG REPORT] [mm-hotplug, aio] aio ring_pages can't be offlined

2012-11-29 Thread Andrew Morton
On Thu, 29 Nov 2012 14:54:58 +0800 Lin Feng wrote: > Hi all, > > We encounter a "Resource temporarily unavailable" fail while trying > to offline a memory section in a movable zone. We found that there are > some pages can't be migrated. The offline operation fails in function > migrate_page_m

[BUG REPORT] [mm-hotplug, aio] aio ring_pages can't be offlined

2012-11-28 Thread Lin Feng
Hi all, We encounter a "Resource temporarily unavailable" fail while trying to offline a memory section in a movable zone. We found that there are some pages can't be migrated. The offline operation fails in function migrate_page_move_mapping() returning -EAGAIN till timeout because the if asse