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: <6d6a94c50701191804m79c70afdo1e664a072f928b9e@mail.gmail.com>
Date:	Sat, 20 Jan 2007 10:04:07 +0800
From:	"Aubrey Li" <aubreylee@...il.com>
To:	"Vaidyanathan Srinivasan" <svaidy@...ux.vnet.ibm.com>
Cc:	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	"Linus Torvalds" <torvalds@...l.org>,
	"Andrew Morton" <akpm@...l.org>,
	"Nick Piggin" <nickpiggin@...oo.com.au>,
	"linux-os (Dick Johnson)" <linux-os@...logic.com>,
	"Robin Getz" <rgetz@...ckfin.uclinux.org>,
	"Hennerich, Michael" <Michael.Hennerich@...log.com>
Subject: Re: [RPC][PATCH 2.6.20-rc5] limit total vfs page cache

On 1/20/07, Vaidyanathan Srinivasan <svaidy@...ux.vnet.ibm.com> wrote:
>
>
> Aubrey Li wrote:
> > On 1/19/07, Vaidyanathan Srinivasan <svaidy@...ux.vnet.ibm.com> wrote:
> >>
> >> Hi Aubrey,
> >>
> >> The idea of creating separate flag for pagecache in page_alloc is
> >> interesting.  The good part is that you flag watermark low and the
> >> zone reclaimer will do the rest of the job.
> >>
> >> However when the zone reclaimer starts to reclaim pages, it will
> >> remove all cold pages and not specifically pagecache pages.  This
> >> may affect performance of applications.
> >>
> >> One possible solution to this reclaim is to use scan control fields
> >> and ask the shrink_page_list() and shrink_active_list() routines to
> >> target only pagecache pages.  Pagecache pages are not mapped and
> >> they are easy to find on the LRU list.
> >>
> >> Please review my patch at http://lkml.org/lkml/2007/01/17/96
> >>
> >
> > So you mean the existing reclaimer has the same issue, doesn't it?
>
> Well, the existing reclaimer will do the right job if the kernel
> really runs out of memory and need to recover pages for new
> allocations.  The pages to be removed will be the coldest page in
> the system.  However now with the introduction of pagecache limit,
> we are artificially creating a memory scarcity and forcing the
> reclaimer to throw away some pages while we actually have free
> usable RAM.  In this context the choice of pages picked by the
> present reclaimer may not be the best ones.
>
> If pagecache is overlimit, we expect old (cold) pagecache pages to
> be thrown out and reused for new file data.  We do not expect to
> drop a few text or data pages to make room for new pagecache.
>
Well, actually I think this probably not necessary. Because the
reclaimer has no way to predict the behavior of user mode processes,
how do you make sure the pagecache will not be access again in a short
time? So I think the present reclaimer is suitable. Limit pagecache
must affect performance of applications. The key is what do you want
to get?
In my case, I get more memory to allocate, less fragmentation, it can
solve my problem, :)

Now the problem in the idea of the patch is, when vfs cache limit is
hit, reclaimer doesn't reclaim all of the reclaimable pages, it just
give few out. So next time vfs pagecache request, it is quite possible
reclaimer is triggered again. That's the point in my mind affecting
the performance of the applications.

I'll continue to work on this issue to see if I can make a improvement.

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