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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFPAmTTHHk7PWeYRfTHe+g0UwDC4JGYWc8M7_RZ9_poVQGJg6w@mail.gmail.com>
Date:	Mon, 26 Sep 2011 20:25:06 +0530
From:	"kautuk.c @samsung.com" <consul.kautuk@...il.com>
To:	Johannes Weiner <jweiner@...hat.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Mel Gorman <mel@....ul.ie>,
	Minchan Kim <minchan.kim@...il.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	Rik van Riel <riel@...hat.com>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org,
	Lee Schermerhorn <lee.schermerhorn@...com>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
Subject: Re: [patch] mm: remove sysctl to manually rescue unevictable pages

On Mon, Sep 26, 2011 at 7:55 PM, Johannes Weiner <jweiner@...hat.com> wrote:
> On Mon, Sep 26, 2011 at 05:59:39PM +0530, kautuk.c @samsung.com wrote:
>> On Mon, Sep 26, 2011 at 5:40 PM, kautuk.c @samsung.com
>> <consul.kautuk@...il.com> wrote:
>> > On Mon, Sep 26, 2011 at 4:59 PM, Johannes Weiner <jweiner@...hat.com> wrote:
>> >> On Sun, Sep 25, 2011 at 04:29:40PM +0530, Kautuk Consul wrote:
>> >>> write_scan_unavictable_node checks the value req returned by
>> >>> strict_strtoul and returns 1 if req is 0.
>> >>>
>> >>> However, when strict_strtoul returns 0, it means successful conversion
>> >>> of buf to unsigned long.
>> >>>
>> >>> Due to this, the function was not proceeding to scan the zones for
>> >>> unevictable pages even though we write a valid value to the
>> >>> scan_unevictable_pages sys file.
>> >>
>> >> Given that there is not a real reason for this knob (anymore) and that
>> >> it apparently never really worked since the day it was introduced, how
>> >> about we just drop all that code instead?
>> >>
>> >>        Hannes
>> >>
>> >> ---
>> >> From: Johannes Weiner <jweiner@...hat.com>
>> >> Subject: mm: remove sysctl to manually rescue unevictable pages
>> >>
>> >> At one point, anonymous pages were supposed to go on the unevictable
>> >> list when no swap space was configured, and the idea was to manually
>> >> rescue those pages after adding swap and making them evictable again.
>> >> But nowadays, swap-backed pages on the anon LRU list are not scanned
>> >> without available swap space anyway, so there is no point in moving
>> >> them to a separate list anymore.
>> >
>> > Is this code only for anonymous pages ?
>> > It seems to look at all pages in the zone both file as well as anon.
>> >
>> >>
>> >> The manual rescue could also be used in case pages were stranded on
>> >> the unevictable list due to race conditions.  But the code has been
>> >> around for a while now and newly discovered bugs should be properly
>> >> reported and dealt with instead of relying on such a manual fixup.
>> >
>> > What you say seems to be all right for anon pages, but what about file
>> > pages ?
>> > I'm not sure about how this could happen, but what if some file-system caused
>> > a file cache page to be set to evictable or reclaimable without
>> > actually removing
>> > that page from the unevictable list ?
>>
>> What I would like to also add is that while the transition of an anon
>> page from and
>> to the unevictable lists is straight-forward, should we make the same assumption
>> about file cache pages ?
>
> We should make no assumptions if our code base is open source :-)
>
>> I am not sure about this, but could a file-system cause this kind of a problem
>> independent of the mlocking behaviour of a user-mode app ?
>
> Currently, I only see shmem and ramfs meddling with unevictability
> outside of mlock and they both look correct to me.
>
> I'd say that if a filesystem required this knob and user-intervention
> for the VM to behave correctly, it needs fixing.

Yes I agree. Otherwise that kind of defeats the overall purpose of
open-source. :)

Thanks for review and the info.
--
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