search for: page_lock

Displaying 20 results from an estimated 59 matches for "page_lock".

Did you mean: pages_lock
2016 Apr 04
1
[PATCH v3 02/16] mm/compaction: support non-lru movable page migration
...we use it only as a heuristic. But I guess it would require at least RCU-level protection of the page->mapping->a_op->isolate_page chain. > For avoiding that, we need another function to peek which just checks > PG_movable bit instead of all things. > > > /* > * If @page_locked is false, we cannot guarantee page->mapping's stability > * so just the function checks with PG_movable which could be false positive > * so caller should check it again under PG_lock to check a_ops->isolate_page. > */ > static inline int PageMovable(struct page *page,...
2016 Apr 04
1
[PATCH v3 02/16] mm/compaction: support non-lru movable page migration
...we use it only as a heuristic. But I guess it would require at least RCU-level protection of the page->mapping->a_op->isolate_page chain. > For avoiding that, we need another function to peek which just checks > PG_movable bit instead of all things. > > > /* > * If @page_locked is false, we cannot guarantee page->mapping's stability > * so just the function checks with PG_movable which could be false positive > * so caller should check it again under PG_lock to check a_ops->isolate_page. > */ > static inline int PageMovable(struct page *page,...
2016 Apr 04
1
[PATCH v3 03/16] mm: add non-lru movable page support document
On 04/04/2016 04:25 AM, Minchan Kim wrote: >> >> Ah, I see, so it's designed with page lock to handle the concurrent isolations etc. >> >> In http://marc.info/?l=linux-mm&m=143816716511904&w=2 Mel has warned >> about doing this in general under page_lock and suggested that each >> user handles concurrent calls to isolate_page() internally. Might be >> more generic that way, even if all current implementers will >> actually use the page lock. > > We need PG_lock for two reasons. > > Firstly, it guarantees page's fla...
2016 Apr 04
1
[PATCH v3 03/16] mm: add non-lru movable page support document
On 04/04/2016 04:25 AM, Minchan Kim wrote: >> >> Ah, I see, so it's designed with page lock to handle the concurrent isolations etc. >> >> In http://marc.info/?l=linux-mm&m=143816716511904&w=2 Mel has warned >> about doing this in general under page_lock and suggested that each >> user handles concurrent calls to isolate_page() internally. Might be >> more generic that way, even if all current implementers will >> actually use the page lock. > > We need PG_lock for two reasons. > > Firstly, it guarantees page's fla...
2016 May 30
5
PATCH v6v2 02/12] mm: migrate: support non-lru movable page migration
...ldpage, enum migrate_mode); After isolation, VM calls migratepage of driver with isolated page. The function of migratepage is to move content of the old page to new page and set up fields of struct page newpage. Keep in mind that you should clear PG_movable of oldpage via __ClearPageMovable under page_lock if you migrated the oldpage successfully and returns 0. If driver cannot migrate the page at the moment, driver can return -EAGAIN. On -EAGAIN, VM will retry page migration in a short time because VM interprets -EAGAIN as "temporal migration failure". On returning any error except -EAGAIN...
2016 May 30
5
PATCH v6v2 02/12] mm: migrate: support non-lru movable page migration
...ldpage, enum migrate_mode); After isolation, VM calls migratepage of driver with isolated page. The function of migratepage is to move content of the old page to new page and set up fields of struct page newpage. Keep in mind that you should clear PG_movable of oldpage via __ClearPageMovable under page_lock if you migrated the oldpage successfully and returns 0. If driver cannot migrate the page at the moment, driver can return -EAGAIN. On -EAGAIN, VM will retry page migration in a short time because VM interprets -EAGAIN as "temporal migration failure". On returning any error except -EAGAIN...
2016 May 30
1
PATCH v6v2 02/12] mm: migrate: support non-lru movable page migration
...t;After isolation, VM calls migratepage of driver with isolated page. > >The function of migratepage is to move content of the old page to new page > >and set up fields of struct page newpage. Keep in mind that you should > >clear PG_movable of oldpage via __ClearPageMovable under page_lock if you > >migrated the oldpage successfully and returns 0. > > This "clear PG_movable" is one of the reasons I was confused about > what __ClearPageMovable() really does. There's no actual > "PG_movable" page flag and the function doesn't clear even th...
2016 May 30
1
PATCH v6v2 02/12] mm: migrate: support non-lru movable page migration
...t;After isolation, VM calls migratepage of driver with isolated page. > >The function of migratepage is to move content of the old page to new page > >and set up fields of struct page newpage. Keep in mind that you should > >clear PG_movable of oldpage via __ClearPageMovable under page_lock if you > >migrated the oldpage successfully and returns 0. > > This "clear PG_movable" is one of the reasons I was confused about > what __ClearPageMovable() really does. There's no actual > "PG_movable" page flag and the function doesn't clear even th...
2016 May 09
0
[PATCH v5 02/12] mm: migrate: support non-lru movable page migration
...ldpage, enum migrate_mode); After isolation, VM calls migratepage of driver with isolated page. The function of migratepage is to move content of the old page to new page and set up fields of struct page newpage. Keep in mind that you should clear PG_movable of oldpage via __ClearPageMovable under page_lock if you migrated the oldpage successfully and returns MIGRATEPAGE_SUCCESS. If driver cannot migrate the page at the moment, driver can return -EAGAIN. On -EAGAIN, VM will retry page migration in a short time because VM interprets -EAGAIN as "temporal migration failure". On returning any er...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
...ct lguest_guest_info *linfo; + int err; + u64 args[4]; + int i; + + if (file->private_data) + return -EBUSY; + + if (copy_from_user(args, input, sizeof(args)) != 0) + return -EFAULT; + + linfo = kzalloc(sizeof(*linfo), GFP_KERNEL); + if (!linfo) + return -ENOMEM; + + mutex_init(&linfo->page_lock); + + /* FIXME: protect the guest_id counter */ + linfo->guest_id = ++next_guest_id; + + linfo->pfn_limit = args[0]; + linfo->page_offset = args[3]; + linfo->start_kernel_map = args[3]; + + mutex_init(&linfo->page_lock); + INIT_LIST_HEAD(&linfo->pgd_list); + + for (i=0; i...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
...ct lguest_guest_info *linfo; + int err; + u64 args[4]; + int i; + + if (file->private_data) + return -EBUSY; + + if (copy_from_user(args, input, sizeof(args)) != 0) + return -EFAULT; + + linfo = kzalloc(sizeof(*linfo), GFP_KERNEL); + if (!linfo) + return -ENOMEM; + + mutex_init(&linfo->page_lock); + + /* FIXME: protect the guest_id counter */ + linfo->guest_id = ++next_guest_id; + + linfo->pfn_limit = args[0]; + linfo->page_offset = args[3]; + linfo->start_kernel_map = args[3]; + + mutex_init(&linfo->page_lock); + INIT_LIST_HEAD(&linfo->pgd_list); + + for (i=0; i...
2016 May 20
0
[PATCH v6 02/12] mm: migrate: support non-lru movable page migration
...ldpage, enum migrate_mode); After isolation, VM calls migratepage of driver with isolated page. The function of migratepage is to move content of the old page to new page and set up fields of struct page newpage. Keep in mind that you should clear PG_movable of oldpage via __ClearPageMovable under page_lock if you migrated the oldpage successfully and returns 0. If driver cannot migrate the page at the moment, driver can return -EAGAIN. On -EAGAIN, VM will retry page migration in a short time because VM interprets -EAGAIN as "temporal migration failure". On returning any error except -EAGAIN...
2016 May 27
2
[PATCH v6 02/12] mm: migrate: support non-lru movable page migration
...e); > > After isolation, VM calls migratepage of driver with isolated page. > The function of migratepage is to move content of the old page to new page > and set up fields of struct page newpage. Keep in mind that you should > clear PG_movable of oldpage via __ClearPageMovable under page_lock if you > migrated the oldpage successfully and returns 0. > If driver cannot migrate the page at the moment, driver can return -EAGAIN. > On -EAGAIN, VM will retry page migration in a short time because VM interprets > -EAGAIN as "temporal migration failure". On returning any...
2016 May 27
2
[PATCH v6 02/12] mm: migrate: support non-lru movable page migration
...e); > > After isolation, VM calls migratepage of driver with isolated page. > The function of migratepage is to move content of the old page to new page > and set up fields of struct page newpage. Keep in mind that you should > clear PG_movable of oldpage via __ClearPageMovable under page_lock if you > migrated the oldpage successfully and returns 0. > If driver cannot migrate the page at the moment, driver can return -EAGAIN. > On -EAGAIN, VM will retry page migration in a short time because VM interprets > -EAGAIN as "temporal migration failure". On returning any...
2016 May 20
5
[PATCH v6 00/12] Support non-lru page migration
...fix - Sergey * add additional Reviewed-by for zsmalloc - Sergey * From v4 * rebase on mmotm-2016-05-05-17-19 * fix huge object migration - Chulmin * !CONFIG_COMPACTION support for zsmalloc * From v3 * rebase on mmotm-2016-04-06-20-40 * fix swap_info deadlock - Chulmin * race without page_lock - Vlastimil * no use page._mapcount for potential user-mapped page driver - Vlastimil * fix and enhance doc/description - Vlastimil * use page->mapping lower bits to represent PG_movable * make driver side's rule simple. * From v2 * rebase on mmotm-2016-03-29-15-54-16 * check Pa...
2016 May 20
5
[PATCH v6 00/12] Support non-lru page migration
...fix - Sergey * add additional Reviewed-by for zsmalloc - Sergey * From v4 * rebase on mmotm-2016-05-05-17-19 * fix huge object migration - Chulmin * !CONFIG_COMPACTION support for zsmalloc * From v3 * rebase on mmotm-2016-04-06-20-40 * fix swap_info deadlock - Chulmin * race without page_lock - Vlastimil * no use page._mapcount for potential user-mapped page driver - Vlastimil * fix and enhance doc/description - Vlastimil * use page->mapping lower bits to represent PG_movable * make driver side's rule simple. * From v2 * rebase on mmotm-2016-03-29-15-54-16 * check Pa...
2016 May 31
0
[PATCH v6v3 02/12] mm: migrate: support non-lru movable page migration
...; After isolation, VM calls migratepage of driver with isolated page. The function of migratepage is to move content of the old page to new page and set up fields of struct page newpage. Keep in mind that you should indicate to the VM the oldpage is no longer movable via __ClearPageMovable() under page_lock if you migrated the oldpage successfully and returns 0. If driver cannot migrate the page at the moment, driver can return -EAGAIN. On -EAGAIN, VM will retry page migration in a short time because VM interprets -EAGAIN as "temporal migration failure". On returning any error except -EAGAIN...
2016 May 30
0
[PATCH v6 02/12] mm: migrate: support non-lru movable page migration
...t;After isolation, VM calls migratepage of driver with isolated page. > >The function of migratepage is to move content of the old page to new page > >and set up fields of struct page newpage. Keep in mind that you should > >clear PG_movable of oldpage via __ClearPageMovable under page_lock if you > >migrated the oldpage successfully and returns 0. > >If driver cannot migrate the page at the moment, driver can return -EAGAIN. > >On -EAGAIN, VM will retry page migration in a short time because VM interprets > >-EAGAIN as "temporal migration failure". O...
2016 Apr 01
2
[PATCH v3 02/16] mm/compaction: support non-lru movable page migration
Might have been better as a separate migration patch and then a compaction patch. It's prefixed mm/compaction, but most changed are in mm/migrate.c On 03/30/2016 09:12 AM, Minchan Kim wrote: > We have allowed migration for only LRU pages until now and it was > enough to make high-order pages. But recently, embedded system(e.g., > webOS, android) uses lots of non-movable pages(e.g.,
2016 Apr 01
2
[PATCH v3 02/16] mm/compaction: support non-lru movable page migration
Might have been better as a separate migration patch and then a compaction patch. It's prefixed mm/compaction, but most changed are in mm/migrate.c On 03/30/2016 09:12 AM, Minchan Kim wrote: > We have allowed migration for only LRU pages until now and it was > enough to make high-order pages. But recently, embedded system(e.g., > webOS, android) uses lots of non-movable pages(e.g.,