All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Ian Campbell <Ian.Campbell@citrix.com>, Wei Liu <wei.liu2@citrix.com>
Cc: annie.li@oracle.com, xen-devel@lists.xen.org,
	andrew.bennieston@citrix.com,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	stefano.stabellini@eu.citrix.com
Subject: Re: Interesting observation with network event notification and batching
Date: Mon, 17 Jun 2013 11:06:21 +0100	[thread overview]
Message-ID: <51BEFBBD02000078000DEC3F@nat28.tlf.novell.com> (raw)
In-Reply-To: <1371461913.3967.68.camel@zakaz.uk.xensource.com>

>>> On 17.06.13 at 11:38, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> On Sun, 2013-06-16 at 10:54 +0100, Wei Liu wrote:
>> > > Konrad, IIRC you once mentioned you discovered something with event
>> > > notification, what's that?
>> > 
>> > They were bizzare. I naively expected some form of # of physical NIC 
>> > interrupts to be around the same as the VIF or less. And I figured
>> > that the amount of interrupts would be constant irregardless of the
>> > size of the packets. In other words #packets == #interrupts.
>> > 
>> 
>> It could be that the frontend notifies the backend for every packet it
>> sends. This is not desirable and I don't expect the ring to behave that
>> way.
> 
> It is probably worth checking that things are working how we think they
> should. i.e. that netback's calls to RING_FINAL_CHECK_FOR_.. and
> netfront's calls to RING_PUSH_..._AND_CHECK_NOTIFY are placed at
> suitable points to maximise batching.
> 
> Is the RING_FINAL_CHECK_FOR_REQUESTS inside the xen_netbk_tx_build_gops
> loop right? This would push the req_event pointer to just after the last
> request, meaning the net request enqueued by the frontend would cause a
> notification -- even though the backend is actually still continuing to
> process requests and would have picked up that packet without further
> notification. n this case there is a fair bit of work left in the
> backend for this iteration i.e. plenty of opportunity for the frontend
> to queue more requests.
> 
> The comments in ring.h say:
>  *  These macros will set the req_event/rsp_event field to trigger a
>  *  notification on the very next message that is enqueued. If you want to
>  *  create batches of work (i.e., only receive a notification after several
>  *  messages have been enqueued) then you will need to create a customised
>  *  version of the FINAL_CHECK macro in your own code, which sets the event
>  *  field appropriately.
> 
> Perhaps we want to just use RING_HAS_UNCONSUMED_REQUESTS in that loop
> (and other similar loops) and add a FINAL check at the very end?

But then again the macro doesn't update req_event when there
are unconsumed requests already upon entry to the macro.

Jan

  parent reply	other threads:[~2013-06-17 10:06 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-12 10:14 Interesting observation with network event notification and batching Wei Liu
2013-06-14 18:53 ` Konrad Rzeszutek Wilk
2013-06-16  9:54   ` Wei Liu
2013-06-17  9:38     ` Ian Campbell
2013-06-17  9:56       ` Andrew Bennieston
2013-06-17 10:46         ` Wei Liu
2013-06-17 10:56           ` Andrew Bennieston
2013-06-17 11:08             ` Ian Campbell
2013-06-17 11:55               ` Andrew Bennieston
2013-06-17 10:06       ` Jan Beulich [this message]
2013-06-17 10:16         ` Ian Campbell
2013-06-17 10:35       ` Wei Liu
2013-06-17 11:34         ` annie li
2013-06-16 12:46   ` Wei Liu
2013-06-28 16:15 ` Wei Liu
2013-07-01  7:48   ` annie li
2013-07-01  8:54     ` Wei Liu
2013-07-01 14:29       ` Stefano Stabellini
2013-07-01 14:39         ` Wei Liu
2013-07-01 14:54           ` Stefano Stabellini
2013-07-01 15:59       ` annie li
2013-07-01 16:06         ` Wei Liu
2013-07-01 16:53           ` Andrew Bennieston
2013-07-01 17:55             ` Wei Liu
2013-07-03 15:18             ` Wei Liu
2013-07-01 14:19     ` Stefano Stabellini
2013-07-01 15:59       ` annie li

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=51BEFBBD02000078000DEC3F@nat28.tlf.novell.com \
    --to=jbeulich@suse.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=andrew.bennieston@citrix.com \
    --cc=annie.li@oracle.com \
    --cc=konrad.wilk@oracle.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.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 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.