lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 03 Apr 2008 18:20:02 -0700
From:	Jeremy Fitzhardinge <jeremy@...p.org>
To:	Dave Hansen <dave@...ux.vnet.ibm.com>
CC:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	Yasunori Goto <y-goto@...fujitsu.com>,
	Ingo Molnar <mingo@...e.hu>,
	LKML <linux-kernel@...r.kernel.org>,
	Christoph Lameter <clameter@....com>
Subject: Re: [PATCH 1 of 6] hotplug-memory: refactor online_pages to	separate
 zone growth from page onlining

Dave Hansen wrote:
> On Thu, 2008-04-03 at 17:05 -0700, Jeremy Fitzhardinge wrote:
>   
>> +static void grow_zone_span(unsigned long start_pfn, unsigned long
>> end_pfn)
>> +{
>>         unsigned long old_zone_end_pfn;
>> +       struct zone *zone;
>> +       unsigned long flags;
>> +
>> +       /*
>> +        * This doesn't need a lock to do pfn_to_page().
>> +        * The section can't be removed here because of the
>> +        * memory_block->state_sem.
>> +        */
>> +       zone = page_zone(pfn_to_page(start_pfn));
>> +       pgdat_resize_lock(zone->zone_pgdat, &flags);
>>
>>         zone_span_writelock(zone);
>>
>> @@ -149,19 +171,9 @@
>>                                 zone->zone_start_pfn;
>>
>>         zone_span_writeunlock(zone);
>> -}
>>
>> -static void grow_pgdat_span(struct pglist_data *pgdat,
>> -               unsigned long start_pfn, unsigned long end_pfn)
>> -{
>> -       unsigned long old_pgdat_end_pfn =
>> -               pgdat->node_start_pfn + pgdat->node_spanned_pages;
>> -
>> -       if (start_pfn < pgdat->node_start_pfn)
>> -               pgdat->node_start_pfn = start_pfn;
>> -
>> -       pgdat->node_spanned_pages = max(old_pgdat_end_pfn, end_pfn) -
>> -                                       pgdat->node_start_pfn;
>> +       grow_pgdat_span(zone->zone_pgdat, start_pfn, end_pfn);
>> +       pgdat_resize_unlock(zone->zone_pgdat, &flags);
>>  }
>>
>>  static int online_pages_range(unsigned long start_pfn, unsigned long
>> nr_pages,
>> @@ -180,16 +192,12 @@
>>         return 0;
>>  }
>>     
>
> I don't particularly like this change to have grow_pgdat_span() called
> *from* grow_zone_span().  Seems backwards to me.  But, this diff look
> funny (not your fault) so I may just be seeing things. :)
>   

Last time I posted this patch you complained about my name 
"online_pages_zone", suggesting "grow_zone_span".  Since that already 
existed, I took that as a hint to fold the two functions together.  Is 
that not what you meant?

    J
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ