All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: "axboe@kernel.dk" <axboe@kernel.dk>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Felipe Franciosi <felipe.franciosi@citrix.com>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
	"matthew@wil.cx" <matthew@wil.cx>,
	Roger Pau Monne <roger.pau@citrix.com>
Subject: Re: RFC v1: Xen block protocol overhaul - problem statement (with pictures!)
Date: Tue, 22 Jan 2013 14:25:29 -0500	[thread overview]
Message-ID: <20130122192529.GA10733@phenom.dumpdata.com> (raw)
In-Reply-To: <1358771838.3279.201.camel@zakaz.uk.xensource.com>

On Mon, Jan 21, 2013 at 12:37:18PM +0000, Ian Campbell wrote:
> On Fri, 2013-01-18 at 18:20 +0000, Konrad Rzeszutek Wilk wrote:
> > 
> > > > E). The network stack has showed that going in a polling mode does improve
> > > > performance. The current mechanism of kicking the guest and or block
> > > > backend is not always clear.  [TODO: Konrad to explain it in details]
> > 
> > Oh, I never did explain this - but I think the patches that Daniel came
> > up with actually fix a part of it. They make the kick-the-other guest
> > only happen when the backend has processed all of the requests and
> > cannot find anything else to do. Previously it was more of 'done one
> > request, lets kick the backend.'.
> 
> blkback uses RING_PUSH_RESPONSES_AND_CHECK_NOTIFY so doesn't it get some
> amount of evthcn mitigation for free?

So there are two paths here - the kick from a) frontend and the kick b) backend
gives the frontend.

The a) case is fairly straighforward. We process all of the rings we and everytime
we have finished with a request we re-read the producer. So if the frontend keeps
us bussy we will keep on processing.

The b) case is the one that is trigger happy. Every time a request is completed (so
say 44kB of data has finally been read/written) we kick the frontend. In the
networking world there are mechanism to modify the hardware were it would
kick the OS (so frontend in our case) when it has processed 8, 16, or 64 packets
(or some other value). Depending on the latency this can be bad or good. If the
backend is using a very slow disk we would probably want the frontend to be
kicked every time a response has been completed.

But if we have a very fast SSD, we might want to batch those kicks up so
that the frontend does not get kicked that often. I don't know the impact
of these 'one request = one kick' is but we could make this a bit more
adaptive - so that it starts scalling down the kicks as it has more responses.
And if there are less responses it notches up the amount of kicks.
I think this is called adaptive interrupt moderation (Or interrupt coalescing)

> 
> > But going forward, this 'kick-the-other-guest' could be further modulated.
> > If we have a full ring and the frontend keeps on adding entries we (backend)
> > should never get an interrupt. As of matter of fact the frontend should be just
> > polling all the time and process them as fast as possible.
> 
> I think the existing req_event/rsp_event ring fields should enable this
> already, assuming the front- and back-ends are using them right.
> 
> Ian.
> 

  reply	other threads:[~2013-01-22 19:25 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-18 14:31 RFC v1: Xen block protocol overhaul - problem statement (with pictures!) Konrad Rzeszutek Wilk
2012-12-18 14:49 ` Jan Beulich
2013-01-18 16:00 ` Roger Pau Monné
2013-01-18 18:20   ` Konrad Rzeszutek Wilk
2013-01-19 12:44     ` Roger Pau Monné
2013-01-22 19:46       ` Konrad Rzeszutek Wilk
2013-01-23  9:53         ` Ian Campbell
2013-01-23 15:21           ` Konrad Rzeszutek Wilk
2013-01-23 15:41             ` Ian Campbell
2013-01-23 16:59               ` Konrad Rzeszutek Wilk
2013-01-24 10:06                 ` Ian Campbell
2013-01-24 15:11                   ` Konrad Rzeszutek Wilk
2013-02-20 21:31         ` Konrad Rzeszutek Wilk
2013-01-21 12:37     ` Ian Campbell
2013-01-22 19:25       ` Konrad Rzeszutek Wilk [this message]
2013-01-23  9:24         ` Ian Campbell
2013-01-23 15:03           ` Konrad Rzeszutek Wilk
2013-01-23 15:39             ` Ian Campbell
2013-01-23 16:57               ` Konrad Rzeszutek Wilk

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=20130122192529.GA10733@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=axboe@kernel.dk \
    --cc=felipe.franciosi@citrix.com \
    --cc=martin.petersen@oracle.com \
    --cc=matthew@wil.cx \
    --cc=roger.pau@citrix.com \
    --cc=xen-devel@lists.xensource.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 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.