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: <AANLkTin92hywGThE=Z7=ZJOJrmw4yA-d-sFCnUYxS2hd@mail.gmail.com>
Date:	Fri, 27 Aug 2010 18:30:58 -0700
From:	Venkatesh Pallipadi <venki@...gle.com>
To:	Ying Han <yinghan@...gle.com>
Cc:	Minchan Kim <minchan.kim@...il.com>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, Rik van Riel <riel@...hat.com>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
Subject: Re: [PATCH] vmscan: fix missing place to check nr_swap_pages.

On Fri, Aug 27, 2010 at 9:35 AM, Ying Han <yinghan@...gle.com> wrote:
> On Thu, Aug 26, 2010 at 10:00 PM, Minchan Kim <minchan.kim@...il.com> wrote:
>>
>> On Fri, Aug 27, 2010 at 12:31 PM, Ying Han <yinghan@...gle.com> wrote:
>> > On Thu, Aug 26, 2010 at 6:03 PM, Minchan Kim <minchan.kim@...il.com> wrote:
>> >>
>> >> Hello.
>> >>
>> >> On Fri, Aug 27, 2010 at 9:11 AM, Ying Han <yinghan@...gle.com> wrote:
>> >> > Fix a missed place where checks nr_swap_pages to do shrink_active_list. Make the
>> >> > change that moves the check to common function inactive_anon_is_low.
>> >> >
>> >>
>> >> Hmm.. AFAIR, we discussed it at that time but we concluded it's not good.
>> >> That's because nr_swap_pages < 0 means both "NO SWAP" and "NOT enough
>> >> swap space now". If we have a swap device or file but not enough space
>> >> now, we need to aging anon pages to make inactive list enough size.
>> >> Otherwise, working set pages would be swapped out more fast before
>> >> promotion.
>> >
>> > We found the problem on one of our workloads where more TLB flush
>> > happens without the change. Kswapd seems to be calling
>> > shrink_active_list() which eventually clears access bit of those ptes
>> > and does TLB flush
>> > with ptep_clear_flush_young(). This system does not have swap
>> > configured, and why aging the anon lru in that
>> > case?
>>
>> True. I also wanted it but we have to care swap configured but
>> non-enabling still yet system as well as non-swap configured system at
>> that time.
>
> Agree.  In our case, we cares about the case where swap is not enabled
> but is configured .
>>
>> If your system is no swap configured, how about this?
>> (It's a not formal proper patch but just quick patch to show the concept).
>
> In our system, we do have swap configured. In vmscan.c, there are
> couple of places where we skip scanning
> and shrinking anon lru while the condition if(nr_swap_pages <= 0)  is
> true. It still make sense to me to add it
> to the shrink_active() condition as the initial patch.
>
> Also, we found it is quite often to hit the condition
> inactive_anon_is_low on machine with small numa node size, since the
> zone->inactive_ratio is set based on the zone->present_pages.
>

Does "total_swap_pages" help?

Thanks,
Venki
--
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