LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Christoph Lameter <clameter@sgi.com>, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] Implement slub fastpath with sequence number
Date: Tue, 11 Mar 2008 15:34:03 +0100	[thread overview]
Message-ID: <1205246043.8514.188.camel@twins> (raw)
In-Reply-To: <20080311093144.GB30220@Krystal>

On Tue, 2008-03-11 at 05:31 -0400, Mathieu Desnoyers wrote:
> Here is a new version that works. tested on x86. tweaked the bitmasks
> into unions to remove operations from the critical path, but I tried to
> keep that clean. It applies on vm.git HEAD.
> 
> It allows the cmpxchg_local to detect object re-use by keeping a counter in the
> freeoffset MSBs.
> 
> Whenever an object is freed in the cpu slab cache, the counter is incremented.
> Whenever the alloc/free slow paths are modifying the offset or freebase, the
> sequence counter is also incremented. It is used to make sure we know if
> freebase has been modified in an interrupt nested over the fast path.

Is it (remotely) possible that the version will wrap giving the false
impression that nothing has changed and thus falsely proceed with a
wrong object?

I would really prefer if we defer all this fast path fiddling until we
have the cpu_ops in place, this all just makes the code utterly
unreadable.



  parent reply	other threads:[~2008-03-11 14:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-11  9:31 Mathieu Desnoyers
2008-03-11  9:41 ` Nick Piggin
2008-03-11 14:45   ` Pekka Enberg
2008-03-11 23:13     ` Nick Piggin
2008-03-12  4:14       ` Christoph Lameter
2008-03-11 14:34 ` Peter Zijlstra [this message]
2008-03-12  4:15   ` Christoph Lameter
2008-03-12 22:17   ` Mathieu Desnoyers
2008-03-13  1:20     ` Mathieu Desnoyers
2008-03-13  1:35       ` Mathieu Desnoyers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1205246043.8514.188.camel@twins \
    --to=peterz@infradead.org \
    --cc=clameter@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@polymtl.ca \
    --subject='Re: [RFC PATCH] Implement slub fastpath with sequence number' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).