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]
Message-ID: <AANLkTi=FA=m_OqfY6LaX2dXfiHWoa9-70B=uKiuXYg4y@mail.gmail.com>
Date:	Tue, 31 Aug 2010 12:47:41 +0900
From:	Minchan Kim <minchan.kim@...il.com>
To:	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
Cc:	Ying Han <yinghan@...gle.com>, Rik van Riel <riel@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-mm <linux-mm@...ck.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Venkatesh Pallipadi <venki@...gle.com>,
	Johannes Weiner <hannes@...xchg.org>
Subject: Re: [PATCH] vmscan: prevent background aging of anon page in no swap system

On Tue, Aug 31, 2010 at 11:09 AM, KOSAKI Motohiro
<kosaki.motohiro@...fujitsu.com> wrote:
>> How about this?
>>
>> (Not formal patch. If we agree, I will post it later when I have a SMTP).
>>
>>
>> Signed-off-by: Ying Han <yinghan@...gle.com>
>> Signed-off-by: Minchan Kim <minchan.kim@...il.com>
>>
>> diff --git a/mm/vmscan.c b/mm/vmscan.c
>> index 3109ff7..c3c44a8 100644
>> --- a/mm/vmscan.c
>> +++ b/mm/vmscan.c
>> @@ -1579,7 +1579,7 @@ static void shrink_active_list(unsigned long
>> nr_pages, struct zone *zone,
>>         __mod_zone_page_state(zone, NR_ISOLATED_ANON + file, -nr_taken);
>>         spin_unlock_irq(&zone->lru_lock);
>>  }
>> -
>> +#if CONFIG_SWAP
>>  static int inactive_anon_is_low_global(struct zone *zone)
>>  {
>>         unsigned long active, inactive;
>> @@ -1605,12 +1605,21 @@ static int inactive_anon_is_low(struct zone
>> *zone, struct scan_control *sc)
>>  {
>>         int low;
>>
>> +       if (nr_swap_pages)
>> +               return 0;
>
> !nr_swap_pages ?

Yes. :)

>
>
>
>> +
>>         if (scanning_global_lru(sc))
>>                 low = inactive_anon_is_low_global(zone);
>>         else
>>                 low = mem_cgroup_inactive_anon_is_low(sc->mem_cgroup);
>>         return low;
>>  }
>> +#else
>> +static inline int inactive_anon_is_low(struct zone *zone, struct
>> scan_control *sc)
>> +{
>> +       return 0;
>> +}
>> +#endif
>
> Yup. I prefer this explicit #ifdef :)
>

Thanks.

-- 
Kind regards,
Minchan Kim
--
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