All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Benjamin LaHaise <bcrl@kvack.org>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>,
	Suparna Bhattacharya <suparna@in.ibm.com>,
	Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org,
	Linux Filesystem Development <linux-fsdevel@vger.kernel.org>,
	linux-aio@kvack.org
Subject: Re: [RFC] Add support for semaphore-like structure with support for asynchronous I/O
Date: Thu, 7 Apr 2005 12:43:02 +0100	[thread overview]
Message-ID: <20050407114302.GA13363@infradead.org> (raw)
In-Reply-To: <20050405154641.GA27279@kvack.org>

On Tue, Apr 05, 2005 at 11:46:41AM -0400, Benjamin LaHaise wrote:
> On Mon, Apr 04, 2005 at 01:56:35PM -0400, Trond Myklebust wrote:
> > IOW: the current semaphore implementations really all need to die, and
> > be replaced by a single generic version to which it is actually
> > practical to add new functionality.
> 
> I can see that goal, but I don't think introducing iosems is the right 
> way to acheive it.  Instead (and I'll start tackling this), how about 
> factoring out the existing semaphore implementations to use a common 
> lib/semaphore.c, much like lib/rwsem.c?  The iosems can be used as a 
> basis for the implementation, but we can avoid having to do a giant 
> s/semaphore/iosem/g over the kernel tree.

Note that iosem is also a total misowner, it's not a counting semaphore
but a sleeping mutex with some special features.

Now if someone wants my two cent on how to resolve the two gazillion different
implementations mess:

 - switch all current semaphore users that don't need counting semaphores
   over to use a mutex_t type.  For now it can map to struct semaphore.
 - rip out all existing complicated struct semaphore implementations and
   replace it with a portable C implementation.  There's not a lot of users
   anyway.  Add a mutex_t implementation that allows sensible assembly hooks
   for architectures instead of reimplementing all of it
 - add more features to mutex_t where nessecary


WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@infradead.org>
To: Benjamin LaHaise <bcrl@kvack.org>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>,
	Suparna Bhattacharya <suparna@in.ibm.com>,
	Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org,
	Linux Filesystem Development <linux-fsdevel@vger.kernel.org>,
	linux-aio@kvack.org
Subject: Re: [RFC] Add support for semaphore-like structure with support for asynchronous I/O
Date: Thu, 7 Apr 2005 12:43:02 +0100	[thread overview]
Message-ID: <20050407114302.GA13363@infradead.org> (raw)
In-Reply-To: <20050405154641.GA27279@kvack.org>

On Tue, Apr 05, 2005 at 11:46:41AM -0400, Benjamin LaHaise wrote:
> On Mon, Apr 04, 2005 at 01:56:35PM -0400, Trond Myklebust wrote:
> > IOW: the current semaphore implementations really all need to die, and
> > be replaced by a single generic version to which it is actually
> > practical to add new functionality.
> 
> I can see that goal, but I don't think introducing iosems is the right 
> way to acheive it.  Instead (and I'll start tackling this), how about 
> factoring out the existing semaphore implementations to use a common 
> lib/semaphore.c, much like lib/rwsem.c?  The iosems can be used as a 
> basis for the implementation, but we can avoid having to do a giant 
> s/semaphore/iosem/g over the kernel tree.

Note that iosem is also a total misowner, it's not a counting semaphore
but a sleeping mutex with some special features.

Now if someone wants my two cent on how to resolve the two gazillion different
implementations mess:

 - switch all current semaphore users that don't need counting semaphores
   over to use a mutex_t type.  For now it can map to struct semaphore.
 - rip out all existing complicated struct semaphore implementations and
   replace it with a portable C implementation.  There's not a lot of users
   anyway.  Add a mutex_t implementation that allows sensible assembly hooks
   for architectures instead of reimplementing all of it
 - add more features to mutex_t where nessecary

--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to majordomo@kvack.org.  For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>

  parent reply	other threads:[~2005-04-07 11:43 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-30 21:51 [RFC] Add support for semaphore-like structure with support for asynchronous I/O Trond Myklebust
2005-03-30 22:34 ` Andrew Morton
2005-03-30 23:17   ` Trond Myklebust
2005-03-30 23:44     ` Andrew Morton
2005-03-31  0:02       ` Trond Myklebust
2005-03-31 22:53     ` Trond Myklebust
2005-04-01  0:13       ` Andrew Morton
2005-04-01  1:22         ` Trond Myklebust
2005-04-01 14:12           ` Suparna Bhattacharya
2005-04-04 15:52             ` Suparna Bhattacharya
2005-04-04 16:22               ` Benjamin LaHaise
2005-04-04 17:56                 ` Trond Myklebust
2005-04-04 17:56                   ` Trond Myklebust
2005-04-05 15:46                   ` Benjamin LaHaise
2005-04-05 15:46                     ` Benjamin LaHaise
2005-04-06  1:20                     ` Trond Myklebust
2005-04-06  5:17                       ` Bill Huey
2005-04-06  5:01                     ` Suparna Bhattacharya
2005-04-07 11:43                     ` Christoph Hellwig [this message]
2005-04-07 11:43                       ` Christoph Hellwig
2005-04-08 22:39                       ` Benjamin LaHaise
2005-04-08 22:39                         ` Benjamin LaHaise
2005-04-08 23:31                         ` Trond Myklebust
2005-04-10 14:08                           ` Suparna Bhattacharya
2005-04-15 16:13                         ` David Howells
2005-04-15 16:13                           ` David Howells
2005-04-15 22:42                           ` Trond Myklebust
2005-04-15 23:42                             ` Benjamin LaHaise
2005-04-15 23:42                               ` Benjamin LaHaise
2005-04-16 11:12                               ` David Howells
2005-04-16 11:06                             ` David Howells
2005-04-16 11:06                               ` David Howells
2005-04-04 16:39               ` Trond Myklebust
2005-03-31  8:02 ` Nikita Danilov
2005-03-31 12:31   ` Trond Myklebust
2005-03-31 17:09     ` Nikita Danilov
2005-03-31 17:22       ` Trond Myklebust
2005-03-31 17:32         ` Trond Myklebust

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=20050407114302.GA13363@infradead.org \
    --to=hch@infradead.org \
    --cc=akpm@osdl.org \
    --cc=bcrl@kvack.org \
    --cc=linux-aio@kvack.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=suparna@in.ibm.com \
    --cc=trond.myklebust@fys.uio.no \
    /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.