public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Andrew Morton <akpm@osdl.org>
Cc: torvalds@osdl.org, grant_lkml@dodo.com.au,
	linux@rainbow-software.org, andre@tomt.net, a1426z@gawab.com,
	linux-kernel@vger.kernel.org, slpratt@austin.ibm.com
Subject: Re: [git patches] IDE update
Date: Fri, 8 Jul 2005 11:53:48 +0200	[thread overview]
Message-ID: <20050708095335.GD7050@suse.de> (raw)
In-Reply-To: <20050708023430.6a903e55.akpm@osdl.org>

On Fri, Jul 08 2005, Andrew Morton wrote:
> Jens Axboe <axboe@suse.de> wrote:
> >
> > Some more investigation - it appears to be broken read-ahead, actually.
> >  hdparm does repeated read(), lseek() loops which causes the read-ahead
> >  logic to mark the file as being in cache (since it reads the same chunk
> >  every time). Killing the INCACHE check (attached) makes it work fine for
> >  me, Grant can you test if it "fixes" it for you as well?
> > 
> >  No ideas how to fix the read-ahead logic right now, I pondered some
> >  depedency on sequential but I don't see how it can work correctly for
> >  other cases. Perhaps handle_ra_miss() just isn't being called
> >  appropriately everywhere?
> > 
> >  --- mm/readahead.c~	2005-07-08 11:16:14.000000000 +0200
> >  +++ mm/readahead.c	2005-07-08 11:17:49.000000000 +0200
> >  @@ -351,7 +351,9 @@
> >   		ra->cache_hit += nr_to_read;
> >   		if (ra->cache_hit >= VM_MAX_CACHE_HIT) {
> >   			ra_off(ra);
> >  +#if 0
> >   			ra->flags |= RA_FLAG_INCACHE;
> >  +#endif
> >   			return 0;
> >   		}
> >   	} else {
> 
> Interesting.  We should be turning that back off in handle_ra_miss() as
> soon as hdparm seeks away.  I'd be suspecting that we're not correctly
> undoing the resutls of ra_off() within handle_ra_miss(), except you didn't
> comment that bit out.
> 
> Or the readahead code is working as intended, and hdparm is doing something
> really weird which trips it up.
> 
> hdparm should also be misbehaving when run against a regular file, but it
> looks like hdparm would need some alterations to test that.

Just use the test app I posted, it shows the problem just fine. If I use
a regular file, behaviour is identical as expected (ie equally broken
:-).

bart:/data1 # ./read_disk ./test 1
Mem Throughput: 101 MiB/sec
Mem Throughput: 103 MiB/sec
Disk Throughput: 22 MiB/sec

bart:/data1 # ./read_disk ./test
Disk Throughput: 29 MiB/sec

-- 
Jens Axboe


  reply	other threads:[~2005-07-08  9:52 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-03 16:52 [git patches] IDE update Bartlomiej Zolnierkiewicz
2005-07-04 12:01 ` Al Boldi
2005-07-04 12:30   ` Bartlomiej Zolnierkiewicz
2005-07-04 15:30     ` Al Boldi
2005-07-04 15:41       ` Bartlomiej Zolnierkiewicz
2005-07-04 17:06         ` Al Boldi
2005-07-04 17:38           ` Ondrej Zary
2005-07-04 19:51             ` Bartlomiej Zolnierkiewicz
2005-07-04 20:32               ` Al Boldi
2005-07-04 20:47                 ` Bartlomiej Zolnierkiewicz
2005-07-04 23:25                 ` André Tomt
2005-07-05  3:43                   ` IOWAIT block layer problem Al Boldi
2005-07-05 10:01                   ` [git patches] IDE update Ondrej Zary
2005-07-05 10:14                     ` Jens Axboe
2005-07-05 10:19                       ` Ondrej Zary
2005-07-05 10:42                         ` Jens Axboe
2005-07-05 12:35                           ` Ondrej Zary
2005-07-05 12:51                             ` Jens Axboe
2005-07-05 13:02                               ` Ondrej Zary
2005-07-05 13:11                                 ` Jens Axboe
2005-07-05 15:51                                   ` Ondrej Zary
2005-07-05 14:21                                     ` Jens Axboe
2005-07-05 15:00                                       ` Ondrej Zary
2005-07-05 19:18                                         ` Jens Axboe
2005-07-05 19:25                                         ` Jens Axboe
2005-07-05 21:36                                           ` Ondrej Zary
2005-07-05 17:27                                       ` Linus Torvalds
2005-07-05 19:14                                         ` Jens Axboe
2005-07-05 21:39                                           ` Ondrej Zary
2005-07-11 14:21                                           ` Alan Cox
2005-07-06  0:35                                       ` Grant Coady
2005-07-06  0:51                                         ` Linus Torvalds
2005-07-06  3:26                                           ` Al Boldi
2005-07-06  4:56                                           ` Grant Coady
2005-07-06  5:22                                             ` Linus Torvalds
2005-07-08  8:48                                               ` Jens Axboe
2005-07-08  9:24                                                 ` Jens Axboe
2005-07-08  9:34                                                   ` Andrew Morton
2005-07-08  9:53                                                     ` Jens Axboe [this message]
2005-07-08 22:25                                                       ` Steven Pratt
2005-07-09  5:40                                                         ` Jens Axboe
2005-07-09 21:39                                                           ` Al Boldi
2005-07-08 10:20                                                 ` Ingo Molnar
2005-07-08 11:45                                                   ` Jens Axboe
2005-07-07 22:32                                         ` Mark Lord
2005-07-08  0:06                                           ` Grant Coady
2005-07-08 11:37                                             ` Erik Slagter
2005-07-06 20:56                         ` Bill Davidsen
2005-07-07 13:47                           ` Ondrej Zary
2005-07-07 13:48                           ` Bartlomiej Zolnierkiewicz
2005-07-07 19:34                             ` Bill Davidsen
2005-07-05  2:47 ` Jeff Garzik
  -- strict thread matches above, loose matches on Subject: below --
2005-08-18 21:37 [git patches] ide update Bartlomiej Zolnierkiewicz
2005-08-18 22:15 ` Linus Torvalds
2005-08-18 22:19   ` Nish Aravamudan
2005-08-19  0:44   ` Mark Lord
2005-08-18 23:08 ` Alan Cox
2005-08-19  9:02   ` Bartlomiej Zolnierkiewicz
2005-08-19 18:06     ` Alan Cox
2005-08-19 23:51       ` Bartlomiej Zolnierkiewicz
2005-08-19 23:52         ` Bartlomiej Zolnierkiewicz
2005-11-10  1:00 Bartlomiej Zolnierkiewicz
2005-11-18 23:21 Bartlomiej Zolnierkiewicz
2005-11-19 23:46 Bartlomiej Zolnierkiewicz
2005-12-15  2:03 Bartlomiej Zolnierkiewicz
2007-05-09 22:46 [git patches] IDE update Bartlomiej Zolnierkiewicz
2007-05-09 22:46 ` Jeff Garzik
2007-05-09 23:20   ` David Miller
2007-05-09 23:23   ` Bartlomiej Zolnierkiewicz
2007-05-09 23:18     ` Jeff Garzik
2007-05-09 22:47 ` Jeff Garzik
2007-05-09 22:59   ` Andrew Morton
2007-05-09 23:15     ` Jeff Garzik
2007-07-09 21:46 Bartlomiej Zolnierkiewicz

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=20050708095335.GD7050@suse.de \
    --to=axboe@suse.de \
    --cc=a1426z@gawab.com \
    --cc=akpm@osdl.org \
    --cc=andre@tomt.net \
    --cc=grant_lkml@dodo.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rainbow-software.org \
    --cc=slpratt@austin.ibm.com \
    --cc=torvalds@osdl.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