All of lore.kernel.org
 help / color / mirror / Atom feed
From: Huang Ying <ying.huang@intel.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Andi Kleen <andi@firstfloor.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>, Chris Mason <chris.mason@oracle.com>
Subject: Re: [PATCH -v10 0/4] Lock-less list
Date: Thu, 20 Jan 2011 09:09:56 +0800	[thread overview]
Message-ID: <1295485796.15213.38.camel@yhuang-dev> (raw)
In-Reply-To: <20110119165247.cca2f434.akpm@linux-foundation.org>

On Thu, 2011-01-20 at 08:52 +0800, Andrew Morton wrote:
> On Thu, 20 Jan 2011 08:45:58 +0800
> Huang Ying <ying.huang@intel.com> wrote:
> 
> > On Thu, 2011-01-20 at 05:55 +0800, Andrew Morton wrote:
> > > I'm trying to remember why we're talking about this.
> > > 
> > > You had an ACPI-based "hardware error reporting" thing.  And that
> > > required an nmi-context memory allocator.  And that required a
> > > "lockless" list implementation.
> > > 
> > > Yes?
> > 
> > Yes.  But the "lockless" list implementation is general, it can be used
> > by other part of kernel too,  such as irq_work and xlist in
> > net/rds/xlist.h in the patchset.
> 
> Well.  Lots of things are general but that doesn't mean we toss them
> into the kernel when we already have plenty of infrastructure to handle
> that sort of thing.
> 
> otoh, hoisting xlist.h out of net/rds and making it generally available
> is a good thing.
> 
> otooh, net/rds/ probably didn't need xlist at all and could have used
> existing general code.

>From commit description of xlist, it seems that xlist is created for
some performance issue.

commit 6fa70da6081bbcf948801fd5ee0be4d222298a43
Author: Chris Mason <chris.mason@oracle.com>
Date:   Fri Jun 11 11:17:59 2010 -0700

    rds: recycle FMRs through lockless lists
    
    FRM allocation and recycling is performance critical and fairly lock
    intensive.  The current code has a per connection lock that all
    processes bang on and it becomes a major bottleneck on large systems.
    
    This changes things to use a number of cmpxchg based lists instead,
    allowing us to go through the whole FMR lifecycle without locking inside
    RDS.

    [snip]

So general list may be not good for them.

> So...  I'd say that unless and until the NMI-context allocator is
> merged, the case for merging the lockless list code is a bit marginal? 

In fact, lockless allocator is not really depends on llist, it just
depends on the ARCH_HAVE_NMI_SAFE_CMPXCHG patch in the patchset.

> Or have you identified other code sites which could use llist and which
> would gain some benefit from migrating?

The llist will be used by APEI (ACPI Platform Error Interface, that is,
an ACPI-based "hardware error reporting" thing).  It may be used by
other hardware error reporting mechanisms too, which involves NMI or
NMI-like notification method.

Best Regards,
Huang Ying



  reply	other threads:[~2011-01-20  1:10 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-17  6:16 [PATCH -v10 0/4] Lock-less list Huang Ying
2011-01-17  6:16 ` [PATCH -v10 1/4] Add Kconfig option ARCH_HAVE_NMI_SAFE_CMPXCHG Huang Ying
2011-01-17  6:16 ` [PATCH -v10 2/4] lib, Add lock-less NULL terminated single list Huang Ying
2011-01-17  6:16 ` [PATCH -v10 3/4] irq_work, Use llist in irq_work Huang Ying
2011-01-17  6:16 ` [PATCH -v10 4/4] net, rds, Replace xlist in net/rds/xlist.h with llist Huang Ying
2011-01-19 21:55 ` [PATCH -v10 0/4] Lock-less list Andrew Morton
2011-01-20  0:45   ` Huang Ying
2011-01-20  0:52     ` Andrew Morton
2011-01-20  1:09       ` Huang Ying [this message]
2011-01-20 10:44       ` Peter Zijlstra
2011-01-20 11:18         ` huang ying
2011-01-20 11:27           ` Peter Zijlstra
2011-01-20 11:57             ` huang ying
2011-01-20 12:14               ` Ingo Molnar
2011-01-20 12:49                 ` huang ying
2011-01-20 13:06                   ` Ingo Molnar
2011-01-20 13:24                     ` huang ying
2011-01-20 13:36                     ` Borislav Petkov
2011-01-20 14:11                       ` Ingo Molnar
2011-01-20 17:59                         ` Luck, Tony
2011-01-20 22:53                     ` Mike Waychison
2011-01-21 17:39                       ` Tim Hockin
2011-01-21 18:01                         ` Borislav Petkov
2011-01-20  5:55 ` Mathieu Desnoyers
2011-01-20  8:57   ` huang ying

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=1295485796.15213.38.camel@yhuang-dev \
    --to=ying.huang@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=chris.mason@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=torvalds@linux-foundation.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.