mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org,
	Linux Filesystem Development <linux-fsdevel@vger.kernel.org>
Subject: Re: [RFC] Add support for semaphore-like structure with support for asynchronous I/O
Date: Wed, 30 Mar 2005 18:17:43 -0500	[thread overview]
Message-ID: <1112224663.18019.39.camel@lade.trondhjem.org> (raw)
In-Reply-To: <20050330143409.04f48431.akpm@osdl.org>

on den 30.03.2005 Klokka 14:34 (-0800) skreiv Andrew Morton:

> > Anyhow, the following is a simple implementation of semaphores designed
> > to satisfy the needs of those I/O subsystems that want to support
> > asynchronous behaviour too. Please comment.
> > 
> 
> So I've been staring at this code for a while and I Just Don't Get It.  If
> I want some custom callback function to be called when someone does an
> iosem_unlock(), how do I do it?

I haven't added support for arbitrary callback functions. It is quite
possible to expand the interfaces to do so should someone need that
functionality, however my current needs only dictate that I be able to
grant the iosem token to a workqueue item, then schedule that work for
execution by keventd.

This is required in order to allow threads such as rpciod or keventd
itself (for which sleeping may cause deadlocks) to ask the iosem manager
code to simply queue the work that need to run once the iosem has been
granted. That work function is then, of course, responsible for
releasing the iosem when it is done.

> Or have I misunderstood the intent?  Some /* comments */ would be appropriate..

Will do.

Cheers,
  Trond
-- 
Trond Myklebust <trond.myklebust@fys.uio.no>


  reply	other threads:[~2005-03-30 23:18 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-30 21:51 Trond Myklebust
2005-03-30 22:34 ` Andrew Morton
2005-03-30 23:17   ` Trond Myklebust [this message]
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
     [not found]             ` <20050404155245.GA4659@in.ibm.com>
     [not found]               ` <20050404162216.GA18469@kvack.org>
2005-04-04 17:56                 ` Trond Myklebust
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
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 22:42                         ` Trond Myklebust
2005-04-15 23:42                           ` Benjamin LaHaise
2005-04-16 11:12                           ` David Howells
2005-04-16 11:06                         ` David Howells

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=1112224663.18019.39.camel@lade.trondhjem.org \
    --to=trond.myklebust@fys.uio.no \
    --cc=akpm@osdl.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®