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] [day] [month] [year] [list]
Message-ID: <08421531-1df0-3cea-fe44-2e4e30808dfd@suse.cz>
Date:   Fri, 18 Sep 2020 14:02:42 +0200
From:   Vlastimil Babka <vbabka@...e.cz>
To:     Oscar Salvador <osalvador@...e.de>
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        Michal Hocko <mhocko@...nel.org>,
        Pavel Tatashin <pasha.tatashin@...een.com>,
        David Hildenbrand <david@...hat.com>,
        Joonsoo Kim <iamjoonsoo.kim@....com>
Subject: Re: [RFC 4/5] mm, page_alloc: cache pageset high and batch in struct
 zone

On 9/10/20 1:30 PM, Oscar Salvador wrote:
> On Mon, Sep 07, 2020 at 06:36:27PM +0200, Vlastimil Babka wrote:
>    */
>> -static void setup_pageset(struct per_cpu_pageset *p);
>> +static void pageset_init(struct per_cpu_pageset *p);
> 
> this belongs to the respective patches

Right, thanks.

>> -static void zone_set_pageset_high_and_batch(struct zone *zone)
>> +static void zone_set_pageset_high_and_batch(struct zone *zone, bool force_update)
>>  {
>>  	unsigned long new_high;
>>  	unsigned long new_batch;
>> @@ -6256,6 +6256,14 @@ static void zone_set_pageset_high_and_batch(struct zone *zone)
>>  		new_batch = max(1UL, 1 * new_batch);
>>  	}
>>  
>> +	if (zone->pageset_high != new_high ||
>> +	    zone->pageset_batch != new_batch) {
>> +		zone->pageset_high = new_high;
>> +		zone->pageset_batch = new_batch;
>> +	} else if (!force_update) {
>> +		return;
>> +	}
> 
> I am probably missimg something obvious, so sorry, but why do we need
> force_update here?
> AFAICS, we only want to call pageset_update() in case zone->pageset_high/batch
> and the new computed high/batch differs, so if everything is equal, why do we want
> to call it anyways?

My reasoning is that initially we don't have guarantee that
zone->pageset_high/batch matches the respective pcp->high/batch. So we could
detect no change in the zone values and return, but leave the pcp value
incoherent. But now I think it could be achieved also in a simpler way, so I'll try.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ