[PATCH 1/3] mm: document zone device struct page reserved fields

2019-07-19 Thread Ralph Campbell
Struct page for ZONE_DEVICE private pages uses the reserved fields when anonymous pages are migrated to device private memory. This is so the page->mapping and page->index fields are preserved and the page can be migrated back to system memory. Document this in comments so it is more clear. Signed

Re: [PATCH 1/3] mm: document zone device struct page reserved fields

2019-07-17 Thread Ralph Campbell
On 7/16/19 9:38 PM, Christoph Hellwig wrote: On Tue, Jul 16, 2019 at 09:31:33PM -0700, John Hubbard wrote: OK, so just delete all the _zd_pad_* fields? Works for me. It's misleading to calling something padding, if it's actually unavailable because it's used in the other union, so deleting wou

Re: [PATCH 1/3] mm: document zone device struct page reserved fields

2019-07-16 Thread Christoph Hellwig
On Tue, Jul 16, 2019 at 09:31:33PM -0700, John Hubbard wrote: > OK, so just delete all the _zd_pad_* fields? Works for me. It's misleading to > calling something padding, if it's actually unavailable because it's used > in the other union, so deleting would be even better than commenting. > > In t

Re: [PATCH 1/3] mm: document zone device struct page reserved fields

2019-07-16 Thread John Hubbard
On 7/16/19 9:22 PM, Christoph Hellwig wrote: > On Tue, Jul 16, 2019 at 06:20:23PM -0700, John Hubbard wrote: >>> - unsigned long _zd_pad_1;/* uses mapping */ >>> + /* >>> +* The following fields are used to hold the source >>> +

Re: [PATCH 1/3] mm: document zone device struct page reserved fields

2019-07-16 Thread Christoph Hellwig
On Tue, Jul 16, 2019 at 06:20:23PM -0700, John Hubbard wrote: > > - unsigned long _zd_pad_1;/* uses mapping */ > > + /* > > +* The following fields are used to hold the source > > +* page anonymous mapping informati

Re: [PATCH 1/3] mm: document zone device struct page reserved fields

2019-07-16 Thread John Hubbard
On 7/16/19 5:14 PM, Ralph Campbell wrote: > Struct page for ZONE_DEVICE private pages uses the reserved fields when > anonymous pages are migrated to device private memory. This is so > the page->mapping and page->index fields are preserved and the page can > be migrated back to system memory. > Do

[PATCH 1/3] mm: document zone device struct page reserved fields

2019-07-16 Thread Ralph Campbell
Struct page for ZONE_DEVICE private pages uses the reserved fields when anonymous pages are migrated to device private memory. This is so the page->mapping and page->index fields are preserved and the page can be migrated back to system memory. Document this in comments so it is more clear. Signed