mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Felix von Leitner <felix-kernel@fefe.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Request: I/O request recording
Date: Sat, 24 Jan 2004 15:35:51 -0800	[thread overview]
Message-ID: <20040124153551.24e74f63.akpm@osdl.org> (raw)
In-Reply-To: <20040124181026.GA22100@codeblau.de>

Felix von Leitner <felix-kernel@fefe.de> wrote:
>
> I would like to have a user space program that I could run while I cold
> start KDE.  The program would then record which I/O pages were read in
> which order.  The output of that program could then be used to pre-cache
> all those pages, but in an order that reduces disk head movement.
> Demand Loading unfortunately produces lots of random page I/O scattered
> all over the disk.

I wrote a similar thing in September of 2001.  What you do is:

- Reboot the system, wait until everything is steady-state (eg: X has
  started, applications are loaded).

- Load a kernel module which dumps the current contents of the pagecache
  (filename/offset-into-file) into a file.

  (The kernel module writes to modprobe's stdout, so you just do

	modprobe fboot-dump > /tmp/fboot-dump.out

   I'm very proud of this.)

- Post-process the resulting output into a database which is used on the
  next reboot.

- reboot

- This time a userspace application cuts in real early and reads the
  database and preloads all the pagecache using "optimal" I/O patterns so
  that everything which you will need in the subsequent boot is already in
  memory.


So it's all an attempt to optimise the boot-time I/O patterns.  It was
pretty much a waste of time, gaining only 10% or so, from memory.  You
could get just as much or more speedup from simply launching all the
initscripts in parallel, although this did tend to break stuff.

Anyway, the code's ancient but might provide some ideas:

	http://www.zip.com.au/~akpm/linux/fboot.tar.gz



  parent reply	other threads:[~2004-01-24 23:36 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-24 18:10 Felix von Leitner
2004-01-24 18:23 ` Valdis.Kletnieks
2004-01-24 18:26 ` Arjan van de Ven
2004-01-24 19:25   ` Ville Herva
2004-01-24 22:43     ` Arjan van de Ven
2004-01-24 20:11 ` Diego Calleja
2004-01-24 21:09   ` Ville Herva
2004-01-24 23:35 ` Andrew Morton [this message]
2004-01-24 23:53   ` Davide Libenzi
2004-01-25  0:03     ` Andrew Morton
2004-01-25  0:09       ` Davide Libenzi
2004-01-25  0:04     ` Valdis.Kletnieks
2004-01-25  0:10       ` Davide Libenzi
2004-01-25 12:26     ` Felipe Alfaro Solana
2004-01-25 22:59   ` Bart Samwel
2004-01-25 23:09     ` Andrew Morton
2004-01-25 23:29       ` Bart Samwel
2004-01-25 23:38         ` Andrew Morton
2004-01-26  0:23           ` Diego Calleja García
2004-01-26  0:32             ` Andrew Morton
2004-01-26 11:50           ` Bart Samwel
2004-01-26 11:57             ` Andrew Morton
2004-01-27 19:13           ` Bart Samwel

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=20040124153551.24e74f63.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=felix-kernel@fefe.de \
    --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®