Re: [RFC][Patch v11 1/2] mm: page_hinting: core infrastructure

2019-08-08 Thread Nitesh Narayan Lal
On 7/12/19 12:22 PM, Alexander Duyck wrote: > On Thu, Jul 11, 2019 at 6:13 PM Nitesh Narayan Lal wrote: >> >> On 7/11/19 7:20 PM, Alexander Duyck wrote: >>> On Thu, Jul 11, 2019 at 10:58 AM Nitesh Narayan Lal >>> wrote: On 7/10/19 5:56 PM, Alexander Duyck wrote: > On Wed, Jul 10, 2019

Re: [RFC][Patch v11 1/2] mm: page_hinting: core infrastructure

2019-07-15 Thread David Hildenbrand
On 15.07.19 11:33, David Hildenbrand wrote: > On 11.07.19 20:21, Dave Hansen wrote: >> On 7/10/19 12:51 PM, Nitesh Narayan Lal wrote: >>> +static void bm_set_pfn(struct page *page) >>> +{ >>> + struct zone *zone = page_zone(page); >>> + int zone_idx = page_zonenum(page); >>> + unsigned long b

Re: [RFC][Patch v11 1/2] mm: page_hinting: core infrastructure

2019-07-15 Thread David Hildenbrand
On 11.07.19 20:21, Dave Hansen wrote: > On 7/10/19 12:51 PM, Nitesh Narayan Lal wrote: >> +static void bm_set_pfn(struct page *page) >> +{ >> +struct zone *zone = page_zone(page); >> +int zone_idx = page_zonenum(page); >> +unsigned long bitnr = 0; >> + >> +lockdep_assert_held(&zone-

Re: [RFC][Patch v11 1/2] mm: page_hinting: core infrastructure

2019-07-15 Thread David Hildenbrand
On 10.07.19 22:45, Dave Hansen wrote: > On 7/10/19 12:51 PM, Nitesh Narayan Lal wrote: >> +struct zone_free_area { >> +unsigned long *bitmap; >> +unsigned long base_pfn; >> +unsigned long end_pfn; >> +atomic_t free_pages; >> +unsigned long nbits; >> +} free_area[MAX_NR_ZONES]; >

Re: [RFC][Patch v11 1/2] mm: page_hinting: core infrastructure

2019-07-12 Thread Nitesh Narayan Lal
On 7/12/19 12:22 PM, Alexander Duyck wrote: > On Thu, Jul 11, 2019 at 6:13 PM Nitesh Narayan Lal wrote: >> >> On 7/11/19 7:20 PM, Alexander Duyck wrote: >>> On Thu, Jul 11, 2019 at 10:58 AM Nitesh Narayan Lal >>> wrote: On 7/10/19 5:56 PM, Alexander Duyck wrote: > On Wed, Jul 10, 2019

Re: [RFC][Patch v11 1/2] mm: page_hinting: core infrastructure

2019-07-12 Thread Alexander Duyck
On Thu, Jul 11, 2019 at 6:13 PM Nitesh Narayan Lal wrote: > > > On 7/11/19 7:20 PM, Alexander Duyck wrote: > > On Thu, Jul 11, 2019 at 10:58 AM Nitesh Narayan Lal > > wrote: > >> > >> On 7/10/19 5:56 PM, Alexander Duyck wrote: > >>> On Wed, Jul 10, 2019 at 12:52 PM Nitesh Narayan Lal > >>> wro

Re: [RFC][Patch v11 1/2] mm: page_hinting: core infrastructure

2019-07-11 Thread Nitesh Narayan Lal
On 7/11/19 7:20 PM, Alexander Duyck wrote: > On Thu, Jul 11, 2019 at 10:58 AM Nitesh Narayan Lal wrote: >> >> On 7/10/19 5:56 PM, Alexander Duyck wrote: >>> On Wed, Jul 10, 2019 at 12:52 PM Nitesh Narayan Lal >>> wrote: This patch introduces the core infrastructure for free page hinting i

Re: [RFC][Patch v11 1/2] mm: page_hinting: core infrastructure

2019-07-11 Thread Alexander Duyck
On Thu, Jul 11, 2019 at 10:58 AM Nitesh Narayan Lal wrote: > > > On 7/10/19 5:56 PM, Alexander Duyck wrote: > > On Wed, Jul 10, 2019 at 12:52 PM Nitesh Narayan Lal > > wrote: > >> This patch introduces the core infrastructure for free page hinting in > >> virtual environments. It enables the ker

Re: [RFC][Patch v11 1/2] mm: page_hinting: core infrastructure

2019-07-11 Thread Dave Hansen
On 7/10/19 12:51 PM, Nitesh Narayan Lal wrote: > +static void bm_set_pfn(struct page *page) > +{ > + struct zone *zone = page_zone(page); > + int zone_idx = page_zonenum(page); > + unsigned long bitnr = 0; > + > + lockdep_assert_held(&zone->lock); > + bitnr = pfn_to_bit(page, zo

Re: [RFC][Patch v11 1/2] mm: page_hinting: core infrastructure

2019-07-11 Thread Nitesh Narayan Lal
On 7/10/19 5:56 PM, Alexander Duyck wrote: > On Wed, Jul 10, 2019 at 12:52 PM Nitesh Narayan Lal wrote: >> This patch introduces the core infrastructure for free page hinting in >> virtual environments. It enables the kernel to track the free pages which >> can be reported to its hypervisor so t

Re: [RFC][Patch v11 1/2] mm: page_hinting: core infrastructure

2019-07-11 Thread Nitesh Narayan Lal
On 7/11/19 12:45 PM, Dave Hansen wrote: > On 7/11/19 9:36 AM, Nitesh Narayan Lal wrote: >> +struct zone_free_area { >> +unsigned long *bitmap; >> +unsigned long base_pfn; >> +unsigned long end_pfn; >> +atomic_t free_pages; >> +unsign

Re: [RFC][Patch v11 1/2] mm: page_hinting: core infrastructure

2019-07-11 Thread Dave Hansen
On 7/11/19 9:36 AM, Nitesh Narayan Lal wrote: > +struct zone_free_area { > + unsigned long *bitmap; > + unsigned long base_pfn; > + unsigned long end_pfn; > + atomic_t free_pages; > + unsigned long nbits; > +} free_area[MAX_NR_ZONES]; Why do we need an extra data st

Re: [RFC][Patch v11 1/2] mm: page_hinting: core infrastructure

2019-07-11 Thread Nitesh Narayan Lal
On 7/11/19 12:22 PM, Dave Hansen wrote: > On 7/11/19 8:25 AM, Nitesh Narayan Lal wrote: >> On 7/10/19 4:45 PM, Dave Hansen wrote: >>> On 7/10/19 12:51 PM, Nitesh Narayan Lal wrote: +struct zone_free_area { + unsigned long *bitmap; + unsigned long base_pfn; + unsigned long e

Re: [RFC][Patch v11 1/2] mm: page_hinting: core infrastructure

2019-07-11 Thread Dave Hansen
On 7/11/19 8:25 AM, Nitesh Narayan Lal wrote: > On 7/10/19 4:45 PM, Dave Hansen wrote: >> On 7/10/19 12:51 PM, Nitesh Narayan Lal wrote: >>> +struct zone_free_area { >>> + unsigned long *bitmap; >>> + unsigned long base_pfn; >>> + unsigned long end_pfn; >>> + atomic_t free_pages; >>> + un

Re: [RFC][Patch v11 1/2] mm: page_hinting: core infrastructure

2019-07-11 Thread Nitesh Narayan Lal
On 7/11/19 11:25 AM, Nitesh Narayan Lal wrote: > On 7/10/19 4:45 PM, Dave Hansen wrote: >> On 7/10/19 12:51 PM, Nitesh Narayan Lal wrote: >>> +struct zone_free_area { >>> + unsigned long *bitmap; >>> + unsigned long base_pfn; >>> + unsigned long end_pfn; >>> + atomic_t free_pages; >>> +

Re: [RFC][Patch v11 1/2] mm: page_hinting: core infrastructure

2019-07-11 Thread Nitesh Narayan Lal
On 7/10/19 4:45 PM, Dave Hansen wrote: > On 7/10/19 12:51 PM, Nitesh Narayan Lal wrote: >> +struct zone_free_area { >> +unsigned long *bitmap; >> +unsigned long base_pfn; >> +unsigned long end_pfn; >> +atomic_t free_pages; >> +unsigned long nbits; >> +} free_area[MAX_NR_ZONES]

Re: [RFC][Patch v11 1/2] mm: page_hinting: core infrastructure

2019-07-11 Thread Nitesh Narayan Lal
On 7/10/19 4:45 PM, Dave Hansen wrote: > On 7/10/19 12:51 PM, Nitesh Narayan Lal wrote: >> +struct zone_free_area { >> +unsigned long *bitmap; >> +unsigned long base_pfn; >> +unsigned long end_pfn; >> +atomic_t free_pages; >> +unsigned long nbits; >> +} free_area[MAX_NR_ZONES]

Re: [RFC][Patch v11 1/2] mm: page_hinting: core infrastructure

2019-07-10 Thread Alexander Duyck
On Wed, Jul 10, 2019 at 12:52 PM Nitesh Narayan Lal wrote: > > This patch introduces the core infrastructure for free page hinting in > virtual environments. It enables the kernel to track the free pages which > can be reported to its hypervisor so that the hypervisor could > free and reuse that m

Re: [RFC][Patch v11 1/2] mm: page_hinting: core infrastructure

2019-07-10 Thread Dave Hansen
On 7/10/19 12:51 PM, Nitesh Narayan Lal wrote: > +struct zone_free_area { > + unsigned long *bitmap; > + unsigned long base_pfn; > + unsigned long end_pfn; > + atomic_t free_pages; > + unsigned long nbits; > +} free_area[MAX_NR_ZONES]; Why do we need an extra data structure. W