public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@zip.com.au>
To: Andrea Arcangeli <andrea@suse.de>
Cc: Mike Galbraith <mikeg@wen-online.de>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: -aa VM splitup
Date: Sun, 31 Mar 2002 17:52:06 -0800	[thread overview]
Message-ID: <3CA7BD46.A59532D0@zip.com.au> (raw)
In-Reply-To: <3C9807AD.65EBB69C@zip.com.au> <Pine.LNX.4.10.10203311422310.2622-100000@mikeg.wen-online.de> <20020401030207.N1331@dualathlon.random>

Andrea Arcangeli wrote:
> 
> Another possibility is that the lru could be more fair (we may better at
> flushing dirty pages, allowing them to be discarded in lru order), I
> assume your machine cannot take in cache a kernel tree, so there should
> be a total cache trashing scenario.  So you may want to verify with
> vmstat that both kernels are doing the very same amount of I/O, just to
> be sure one of the two isn't faster because of additional fariness in
> the lru information, and not because of slower I/O.

2.5.x is spending significantly more CPU on I/O for smallish machines
such as Mike's.  The extra bio allocation for each bh is showing up
heavily.

But more significantly, something has gone wrong at the buffer
writeback level.   Try writing a 100 meg file in 4096 byte
write()s.  It's nice.

Now write it in 5000 byte write()s.  It's horrid.  We spend moe
time in write_some_buffers() than in copy_*_user.  With 4096
byte writes, write_some_buffers visits 150,000 buffers.  With
5000-byte writes, it visits 8,000,000.  Under lru_list_lock.

I assume what's happening is that we write to a buffer, it goes onto
BUF_DIRTY and then balance_dirty or bdflush or kupdate moves it to
BUF_LOCKED.  Then write(2) redirties the buffer so it is locked, dirty,
on BUF_DIRTY, with I/O underway.   BUF_DIRTY gets flooded with locked buffers
and we just do enormous amounts of scanning in write_some_buffers().

I haven't looked into this further yet.  Not sure why it only
happens in 2.5.  Maybe it is happening in 2.4, but it's not as
easy to trigger for some reason.

But I don't think there's anything to prevent this from happening
in 2.4 is there?

Also, I've been *trying* to get some decent I/O bandwidth on my test
box, but 2.4 badness keeps on getting in the way.  bounce_end_io_read()
is being particularly irritating.  It's copying tons of data
which has just come in from PCI while inside io_request_lock.  Ugh.

Is there any reason why we can't drop io_request_lock around the
completion handler in end_that_request_first()?

-

  reply	other threads:[~2002-04-01  1:54 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-20  3:53 -aa VM splitup Andrew Morton
2002-03-31 12:26 ` Mike Galbraith
2002-04-01  1:02   ` Andrea Arcangeli
2002-04-01  1:52     ` Andrew Morton [this message]
2002-04-01  2:29       ` Andrea Arcangeli
2002-04-01 12:07     ` Mike Galbraith
2002-04-01 18:02       ` Andrea Arcangeli
2002-04-01 19:02         ` Mike Galbraith
2002-04-01 23:25           ` Marcelo Tosatti
2002-04-02  4:06             ` Mike Galbraith
2002-04-02  7:28         ` Mike Galbraith
2002-04-02 19:25           ` Andrea Arcangeli
2002-04-03  5:28             ` Mike Galbraith
  -- strict thread matches above, loose matches on Subject: below --
2002-04-03  0:37 Andreas Möller

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=3CA7BD46.A59532D0@zip.com.au \
    --to=akpm@zip.com.au \
    --cc=andrea@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikeg@wen-online.de \
    /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