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]
Date:	Wed, 18 May 2011 10:08:48 +0900
From:	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
To:	kamezawa.hiroyu@...fujitsu.com
CC:	linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	akpm@...ux-foundation.org, minchan.kim@...il.com, riel@...hat.com
Subject: Re: [PATCH 3/3] vmscan: implement swap token priority decay

>> diff --git a/mm/thrash.c b/mm/thrash.c
>> index 14c6c9f..0c4f0a8 100644
>> --- a/mm/thrash.c
>> +++ b/mm/thrash.c
>> @@ -47,6 +47,9 @@ void grab_swap_token(struct mm_struct *mm)
>>   	if (!swap_token_mm)
>>   		goto replace_token;
>>
>> +	if (!(global_faults&  0xff))
>> +		mm->token_priority /= 2;
>> +
>
> I personally don't like this kind of checking counter with mask.
> Hmm. How about this ?
>
> ==
> 	#define TOKEN_AGE_MASK	~(0xff)
> 	/*
> 	 * If current global_fault is in different age from previous global_fault,
> 	 * Aging priority and starts new era.
> 	 */
> 	if ((mm->faultstamp&  TOKEN_AGE_MASK) != (global_faults&  MM_TOKEN_MASK))
> 		mm->token_priority /= 2;
> ==

OK. will do.


--
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