All of lore.kernel.org
 help / color / mirror / Atom feed
From: lm@bitmover.com (Larry McVoy)
To: linux-kernel@vger.rutgers.edu
Subject: Useful work vs Elevator sort
Date: Tue, 17 Nov 1998 10:32:11 -0800	[thread overview]
Message-ID: <199811171832.KAA25953@bitmover.com> (raw)

Another thought on all of this discussion about disk sort.  Something that
I think would make a far greater /perceived/ difference would be some sort
of priority based sorting.  The problem that should be solved is to have
page faults for bash/emacs/whatever be "right now" and page faults for
other stuff be "later".  It's an open issue as to how you distinguish.
The first pass is that reads get higher priority than writes and that
is obviously wrong - you'll end up with all of memory being full of
dirty pages.

The next pass is to bump the priority on pages with the execute bit on;
that will handle the instructions nicely, I don't see a down side to it,
maybe someone else does.

The next pass is to bump the priority on pages that are in the swap
partition and associated with the data segment.  This is a little dicey
- if we ever go to the one-swap-file-per-process idea that I've posted
here about a year ago, then this gets easier.

Anyway, the bottom line is that you want the system to do two things

	a) have reasonable latency and great throughput for most stuff
	b) have really good latency for some stuff

I believe that you'll never accomplish that with disk sorting algs.
The disk sort routine isn't given all the information it needs to
accomplish those goals.  So, if we agree that we want something like
I'm describing, then messing about with disk sort, while interesting and
something that every real OS guy does at some point, is a futile exercise.

My point here is to encourage people not to stop if they decide that disk
sorting doesn't really help that much.  I think there is some performance
win that can happen if you think past the confines of the disk sort alg
and go up to a higher level and look at the problem you're really trying
to solve.

-
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:[~1998-11-18  7:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-11-17 18:32 Larry McVoy [this message]
1998-11-19 12:43 ` Useful work vs Elevator sort Vladimir Dergachev

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=199811171832.KAA25953@bitmover.com \
    --to=lm@bitmover.com \
    --cc=linux-kernel@vger.rutgers.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 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.