The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@SteelEye.com>
To: Andrew Morton <akpm@osdl.org>
Cc: stern@rowland.harvard.edu, Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: Elimination of klists
Date: Sun, 11 Sep 2005 18:37:50 -0500	[thread overview]
Message-ID: <1126481870.4831.52.camel@mulgrave> (raw)
In-Reply-To: <20050911152517.7a57ba8d.akpm@osdl.org>

On Sun, 2005-09-11 at 15:25 -0700, Andrew Morton wrote:
> James Bottomley <James.Bottomley@SteelEye.com> wrote:
> >
> > Actually, the concept of a klist is quite nice, and the beauty is that
> >  all the locking is internal to them, so users can't actually get it
> >  wrong (I like interfaces like this).
> 
> You're a bit screwed if you want to use them from interrupts..

Yes, but then they're for refcounted lists.  Quite a few of our
refcounted structures aren't safe for final put from interrupt either.
I take the implied point about wanting to leave the lock selection up to
the list head provider... I just can't see an elegant way of
implementing it given how tightly klist iterators have to bind to the
locking and refcounting.  We could always add another pair of
list_head_lock() list_head_unlock() functions which it's up to the
list_head provider also to supply ... I'm just surprised I didn't get
hammered for using that nasty OO concept of delegates with the get/put
functions ... I'm sure someone will notice if I do it a second time.

James


James



  reply	other threads:[~2005-09-11 23:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-11 19:35 Elimination of klists Alan Stern
2005-09-11 21:44 ` James Bottomley
2005-09-11 22:25   ` Andrew Morton
2005-09-11 23:37     ` James Bottomley [this message]
2005-09-12 14:29   ` Alan Stern

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=1126481870.4831.52.camel@mulgrave \
    --to=james.bottomley@steeleye.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox