From: Andrew Morton <akpm@digeo.com>
To: Badari Pulavarty <pbadari@us.ibm.com>
Cc: Mingming Cao <mcao@us.ibm.com>,
Benjamin LaHaise <bcrl@redhat.com>,
suparna@linux.ibm.com, linux-kernel@vger.kernel.org,
linux-aio@kvack.org, lse-tech@lists.sourceforge.net
Subject: Re: [RFC] [PATCH] 2.5.35 patch for making DIO async--performance numbers
Date: Thu, 19 Sep 2002 14:36:18 -0700 [thread overview]
Message-ID: <3D8A4352.862A0B1A@digeo.com> (raw)
In-Reply-To: <200209192119.g8JLJwl17424@eng2.beaverton.ibm.com>
Badari Pulavarty wrote:
>
> Andrew,
>
> >
> > Thanks. Note that the old code (which seems to be a tiny bit faster,
> > and used less CPU as well) has a significantly higher context switch
> > rate. At a guess I'd say that it is more efficient at getting userspace
> > up and running in response to IO completion.
> >
>
> I my patch, I removed bio_list. So, I do all the processing of "bio"
> in end_io() function, instead of postpone it to waiter. Do you think
> this matters ?
Ah. Yes, it matters.
Running the completion in process context is nicer from an interrupt latency
point of view. But the completion code also runs set_page_dirty(), which
takes locks which are not interrupt-safe. Running set_page_dirty() from
interrupt context can deadlock.
So if it's convenient, yes, let's do the completion in process context.
If not convenient then we'll need to find some way of running
set_page_dirty() outside the interrupt handler.
The set_page_dirty() is there to cover the case of direct-io into a
mmapped region of another file. We need to tell the VM that the page
has been changed, because the CPU's ptes don't know that. And we do
have to run set_page_dirty() after the read IO has completed.
The other thing we've lost is the BIO-pruning and recycling effect: the
current direct-io code will reap BIOs while it is actually submitting
them, so the peak consumption is kept under control. Plus there are
cache-warmness issues. But without having a process there to do all this,
we obviously have to lose some things.
Maybe, that's not very important in real life.
> > I'd say it's only likely to affect these huge linear IOs. Once you get
> > into real workloads which are seeking and merging then a bit of latency
> > here or there would just be soaked up by other system activity.
> >
> > Ah. The current direct-io.c uses wake_up_process(), not waitqueues.
> > So the aio version has to wear the waitqueue cost. If you're using the
> > -mm patch I'd suggest that you convert aio.c to prepare_to_wait/finish_wait.
> > The waitqueue/wakeup costs on your 8-ways seem to be very high.
>
> Ok !! I still use wake_up_process() for the sync case.
> I will try to use waitqueues and see.
>
Well, you're using waitqueues now - please try the fancy new ones.
As ever, profiles will tell us what's going on.
next prev parent reply other threads:[~2002-09-19 21:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-19 20:52 Mingming Cao
2002-09-19 21:11 ` Andrew Morton
2002-09-19 21:19 ` Badari Pulavarty
2002-09-19 21:36 ` Andrew Morton [this message]
2002-09-19 21:53 ` Badari Pulavarty
2002-09-19 22:15 ` Andrew Morton
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=3D8A4352.862A0B1A@digeo.com \
--to=akpm@digeo.com \
--cc=bcrl@redhat.com \
--cc=linux-aio@kvack.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lse-tech@lists.sourceforge.net \
--cc=mcao@us.ibm.com \
--cc=pbadari@us.ibm.com \
--cc=suparna@linux.ibm.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®