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: <1295986943.28776.1108.camel@laptop>
Date:	Tue, 25 Jan 2011 21:22:23 +0100
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Tony Luck <tony.luck@...el.com>
Cc:	Andrea Arcangeli <aarcange@...hat.com>,
	Avi Kivity <avi@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Rik van Riel <riel@...hat.com>, Ingo Molnar <mingo@...e.hu>,
	akpm@...ux-foundation.org,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
	linux-mm@...ck.org,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	David Miller <davem@...emloft.net>,
	Hugh Dickins <hugh.dickins@...cali.co.uk>,
	Mel Gorman <mel@....ul.ie>, Nick Piggin <npiggin@...nel.dk>,
	Paul McKenney <paulmck@...ux.vnet.ibm.com>,
	Yanmin Zhang <yanmin_zhang@...ux.intel.com>
Subject: Re: [PATCH 09/25] ia64: Preemptible mmu_gather

On Tue, 2011-01-25 at 12:12 -0800, Tony Luck wrote:
> On Tue, Jan 25, 2011 at 9:31 AM, Peter Zijlstra <a.p.zijlstra@...llo.nl> wrote:
> >  struct mmu_gather {
> >        struct mm_struct        *mm;
> >        unsigned int            nr;             /* == ~0U => fast mode */
> > +       unsigned int            max;
> >        unsigned char           fullmm;         /* non-zero means full mm flush */
> >        unsigned char           need_flush;     /* really unmapped some PTEs? */
> >        unsigned long           start_addr;
> >        unsigned long           end_addr;
> > -       struct page             *pages[FREE_PTE_NR];
> > +       struct page             **pages;
> > +       struct page             *local[8];
> >  };
> 
> Overall it looks OK - builds, boots & runs too. One question about
> the above bit ... why "8" elements in the local[] array?  This ought to be
> a #define, maybe with a comment explaining the significance. It doesn't
> seem to fill out struct mmu_gather to some "nice" size.  I can't think
> of why batching 8 at a time (in the fallback cannot allocate **pages case)
> is a good number. So is there some science to the choice, or did you
> pluck 8 out of the air? 

Yeah, pretty much a random number small enough to make struct mmu_gather
fit on stack, the reason its not 1 is that a few more entries increase
performance a little and freeing more pages increases the chance the
page allocation works next time around.


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