[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.1.10.0901261225240.1908@qirst.com>
Date: Mon, 26 Jan 2009 12:28:03 -0500 (EST)
From: Christoph Lameter <cl@...ux-foundation.org>
To: Nick Piggin <npiggin@...e.de>
cc: Pekka Enberg <penberg@...helsinki.fi>,
"Zhang, Yanmin" <yanmin_zhang@...ux.intel.com>,
Lin Ming <ming.m.lin@...el.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [patch] SLQB slab allocator
n Fri, 23 Jan 2009, Nick Piggin wrote:
> According to memory policies, a task's memory policy is supposed to
> apply to its slab allocations too.
It does apply to slab allocations. The question is whether it has to apply
to every object allocation or to every page allocation of the slab
allocators.
> > Memory policies are applied in a fuzzy way anyways. A context switch can
> > result in page allocation action that changes the expected interleave
> > pattern. Page populations in an address space depend on the task policy.
> > So the exact policy applied to a page depends on the task. This isnt an
> > exact thing.
>
> There are other memory policies than just interleave though.
Which have similar issues since memory policy application is depending on
a task policy and on memory migration that has been applied to an address
range.
> > > "the first cpu will consume more and more memory from the page allocator
> > > whereas the second will build up huge per cpu lists"
> > >
> > > And this is wrong. There is another possible issue where every single
> > > object on the freelist might come from a different (and otherwise free)
> > > page, and thus eg 100 8 byte objects might consume 400K.
> > >
> > > That's not an invalid concern, but I think it will be quite rare, and
> > > the periodic queue trimming should naturally help this because it will
> > > cycle out those objects and if new allocations are needed, they will
> > > come from new pages which can be packed more densely.
> >
> > Well but you said that you would defer the trimming (due to latency
> > concerns). The longer you defer the larger the lists will get.
>
> But that is wrong. The lists obviously have high water marks that
> get trimmed down. Periodic trimming as I keep saying basically is
> alrady so infrequent that it is irrelevant (millions of objects
> per cpu can be allocated anyway between existing trimming interval)
Trimming through water marks and allocating memory from the page allocator
is going to be very frequent if you continually allocate on one processor
and free on another.
--
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