mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Derek Fawcus <df@eyrie.demon.co.uk>
To: "Jeff V. Merkey" <jmerkey@timpanogas.com>
Cc: linux-kernel@vger.rutgers.edu, torvalds@transmeta.com
Subject: Re: Proposal for task_queue() WorkToDo Optimization for Network File Systems
Date: Fri, 12 May 2000 08:59:39 +0100	[thread overview]
Message-ID: <20000512085939.A22345@eyrie.demon.co.uk> (raw)
In-Reply-To: <391B77F6.14E6F9DA@timpanogas.com>; from jmerkey@timpanogas.com on Thu, May 11, 2000 at 09:17:53PM -0600

On Thu, May 11, 2000 at 09:17:53PM -0600, Jeff V. Merkey wrote:
> 

  [ snip of description ]

This idea has cropped up at least twice over the years,  usually in
comparison to a similar mechanism that exists in VMS.  I know because
I've written a similar followup to the following comparing to the
equivalent model in FlexOS[1] which I've had experience with.

I'd therefore guess to have any chance of seeing this in the kernel,
you'd have to provide working code,  and show that it actually gains
something.  Although this mechanism does have it's nice points,  I'm
not entirely sure that it's a gain over the mechanisms currently
employed in Linux.

In FlexOS the equivalent mechanism was called an Asynchronous Service
Routine (ASR).  There is a global priority ordered list of ASR's which
are run by the scheduler before any task.   The scheduler will only
choose to run a task when the ASR queue is empty.  An ASR has to run
to completion[2] since if it blocked it would halt the scheduler.

The ASR queue is a list of the following:

struct _asr {
    struct _asr *link;
    void (*fn)(ULONG p1, ULONG p2);
    ULONG p1, p2;
    struct _evb *evb; /* If event triggered */
    BYTE *stack;
    WORD stack_len;
    BYTE flags;
    BYTE priority;
};
    
These ASR's are triggered by device driver ISR's,  device driver process
context code,  and filesystem code.  They perform almost all of the I/O
action under FlexOS.

The dispatcher happens to have a task context selected when it is running
(for a task with no user level context - i.e. kernel only),  and the ASR's
can use this to gain access to any process memory.  They can ask to share
the process context of an arbitrary process,  thus allowing I/O direct
from the proces memory.  There is also support for wiring down the process
memory,  but given that there is no swapping implemented,  this is not
used.

The equivalent of the pre-emptive I/O is that ISR's return a true/false
value.  This can be used to force an immediate reschedule in case they
have queued an ASR.  Without this the ASR queue would only get run at
the next time slice or process block.

> The question is how many pieces of this are already in Linux.  I haven't
> seen quite this optimization, but would propose that it be implemented
> with a special atomic task_queue with a very lightweight thread_object. 
> Microsoft uses fibre's which coincidently, appeared in NT three months
> after WorkToDo's were disclosed at a Novell Brainshare Conference in
> front of several of their engineers who were in attendance, though the
> implementation they came up with was not exact (because they really
> didn't know how they worked in NetWare but for some odd reason, had to
> have something like them at the time).  

That's probably a bit disingenious,  given that Cutler worked on VMS.
I'd guess he simply took the idea directly from VMS.

[1] A Real time OS that came out of the Digital Research stable.  Ran for
    a while under the Novell Banner and was then flogged of to ISI who
    sent off to the knackers yard.  I guess WRS now own the shoe leather.

[2] Actually ASR's can arrange to schedule another ASR either immediatly
    or upon the completion of some event (struct _evb) so working around
    blocking issues and allowing the work load to be split up.  There is
    also a 'hack' involving saving the ASR stack that allows an ASR to
    actually block.

DF

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

  reply	other threads:[~2000-05-12  7:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-12  3:18 Jeff V. Merkey
2000-05-12  7:59 ` Derek Fawcus [this message]
2000-05-12 19:53 ` George Anzinger
2000-05-15 18:05 ` Jamie Lokier
2000-05-15 19:00   ` Jeff V. Merkey

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=20000512085939.A22345@eyrie.demon.co.uk \
    --to=df@eyrie.demon.co.uk \
    --cc=jmerkey@timpanogas.com \
    --cc=linux-kernel@vger.rutgers.edu \
    --cc=torvalds@transmeta.com \
    /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®