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: <CANN689EdM6+64hsJgGMSF=6aA8hYJf_4FgdCy3FtqRtDAv87qw@mail.gmail.com>
Date:	Mon, 4 Nov 2013 06:56:38 -0800
From:	Michel Lespinasse <walken@...gle.com>
To:	Ingo Molnar <mingo@...nel.org>
Cc:	Davidlohr Bueso <davidlohr@...com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Hugh Dickins <hughd@...gle.com>, Mel Gorman <mgorman@...e.de>,
	Rik van Riel <riel@...hat.com>,
	Guan Xuetao <gxt@...c.pku.edu.cn>,
	"Chandramouleeswaran, Aswin" <aswin@...com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	linux-mm <linux-mm@...ck.org>
Subject: Re: [PATCH] mm: cache largest vma

On Sun, Nov 3, 2013 at 11:36 PM, Ingo Molnar <mingo@...nel.org> wrote:
> So I think it all really depends on the hit/miss cost difference. It makes
> little sense to add a more complex scheme if it washes out most of the
> benefits!
>
> Also note the historic context: the _original_ mmap_cache, that I
> implemented 16 years ago, was a front-line cache to a linear list walk
> over all vmas (!).
>
> Today we have the vma rbtree, which is self-balancing and a lot faster
> than your typical linear list walk search ;-)
>
> So I'd _really_ suggest to first examine the assumptions behind the cache,
> it being named 'cache' and it having a hit rate does in itself not
> guarantee that it gives us any worthwile cost savings when put in front of
> an rbtree ...

Agree. We have made the general case a lot faster, and caches in front
of it may not pull their weight anymore - the fact that we are
wondering how to even measure that, to me, means that we probably
shouldn't even bother. That's what I did when I implemented the
augmented rbtree to search for allocatable spaces between vmas: I
removed the cache for the last used gap, and nobody has complained
about it since. Absent some contrary data, I would actually prefer we
remove the mmap_cache as well.

And if a multiple-entry cache is necessary, I would also prefer it to
be LRU type rather than something ad-hoc (if there is a benefit to
caching the largest VMA, then LRU would capture that as well...)

-- 
Michel "Walken" Lespinasse
A program is never fully debugged until the last user dies.
--
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