lkml.org 
[lkml]   [2009]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [patch 2/3] slub: scan partial list for free slabs when thrashing
    From
    Date
    Hi David,

    On Mon, 2009-03-30 at 10:37 -0400, Christoph Lameter wrote:
    > > > That adds fastpath overhead and it shows for small objects in your tests.

    On Tue, 31 Mar 2009, Pekka Enberg wrote:
    > > Yup, and looking at this:
    > >
    > > + u16 fastpath_allocs; /* Consecutive fast allocs before slowpath */
    > > + u16 slowpath_allocs; /* Consecutive slow allocs before watermark */
    > >
    > > How much do operations on u16 hurt on, say, x86-64?

    On Tue, 2009-03-31 at 01:23 -0700, David Rientjes wrote:
    > As opposed to unsigned int? These simply use the word variations of the
    > mov, test, cmp, and inc instructions instead of long. It's the same
    > tradeoff when using the u16 slub fields within struct page except it's not
    > strictly required in this instance because of size limitations, but rather
    > for cacheline optimization.

    I was thinking of partial register stalls. But looking at it on x86-64,
    the generated asm seems sane. I see tons of branch instructions, though,
    so simplifying this somehow:

    + if (is_empty) {
    + if (c->fastpath_allocs < s->min_free_watermark)
    + c->slowpath_allocs++;
    + else if (c->slowpath_allocs)
    + c->slowpath_allocs--;
    + } else
    + c->slowpath_allocs = 0;
    + c->fastpath_allocs = 0;

    would be most welcome.

    Pekka



    \
     
     \ /
      Last update: 2009-03-31 10:51    [W:0.022 / U:0.144 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site