All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Vrabel <david.vrabel@citrix.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: annie.li@oracle.com, Wei Liu <wei.liu2@citrix.com>,
	ian.campbell@citrix.com, xen-devel@lists.xen.org
Subject: Re: [PATCH 2/3] xen-netback: switch to per-cpu scratch space
Date: Tue, 28 May 2013 14:36:55 +0100	[thread overview]
Message-ID: <51A4B2F7.2070500@citrix.com> (raw)
In-Reply-To: <20130528131841.GA724@phenom.dumpdata.com>

On 28/05/13 14:18, Konrad Rzeszutek Wilk wrote:
> On Mon, May 27, 2013 at 12:29:42PM +0100, Wei Liu wrote:
>> There are maximum nr_onlie_cpus netback threads running. We can make use
>> of per-cpu scratch space to reduce the size of buffer space when we move
>> to 1:1 model.
>>
>> In the unlikely event when per-cpu scratch space is not available,
>> processing routines will refuse to run on that CPU.
[...]
>> --- a/drivers/net/xen-netback/netback.c
>> +++ b/drivers/net/xen-netback/netback.c
[...]
>> +			printk(KERN_ALERT
>> +			       "xen-netback: "
>> +			       "CPU %d scratch space is not available,"
>> +			       " not doing any TX work for netback/%d\n",
>> +			       smp_processor_id(),
>> +			       (int)(netbk - xen_netbk));
> 
> So ... are you going to retry it? Drop it? Can you include in the message the
> the mechanism by which you are going to recover?
> 
[...]
>> +			       "xen-netback: "
>> +			       "CPU %d scratch space is not available,"
>> +			       " not doing any RX work for netback/%d\n",
>> +			       smp_processor_id(),
>> +			       (int)(netbk - xen_netbk));
> 
> And can you explain what the recovery mechanism is?

There isn't any recovery mechanism at the moment. If the scratch space
was not allocated then any netback thread may end up being unable to do
any work indefinitely (if the scheduler repeatedly schedules them on the
VCPU with no scratch space).

This is an appalling failure mode.

I also don't think there is a sensible way to recover.  We do not want
hotplugging of a VCPU to break or degrade the behaviour of existing VIFs.

The meta data is 12 * 512 = 6144 and the grant table ops is 24 * 512 =
12288.  This works out to 6 pages total.  I think we can spare 6 pages
per VIF and just have per-thread scratch space.

You may also want to consider a smaller batch size instead of allowing
for 2x ring size.  How often do you need this many entries?

David

  reply	other threads:[~2013-05-28 13:36 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-27 11:29 [PATCH 0/3 V2] xen-netback: switch to NAPI + kthread 1:1 model Wei Liu
2013-05-27 11:29 ` [PATCH 1/3] xen-netback: remove page tracking facility Wei Liu
2013-05-28  9:21   ` David Vrabel
2013-05-29  1:43     ` Matt Wilson
2013-05-29  8:12       ` Wei Liu
2013-05-27 11:29 ` [PATCH 2/3] xen-netback: switch to per-cpu scratch space Wei Liu
2013-05-28  9:47   ` annie li
2013-05-28 10:17     ` Wei Liu
2013-05-28 13:18   ` Konrad Rzeszutek Wilk
2013-05-28 13:36     ` David Vrabel [this message]
2013-05-28 13:54       ` Wei Liu
2013-05-27 11:29 ` [PATCH 3/3] xen-netback: switch to NAPI + kthread 1:1 model Wei Liu
2013-05-28 13:37   ` David Vrabel
2013-05-28 13:40     ` Wei Liu
2013-05-28 14:35 ` [PATCH 0/3 V2] " annie li
2013-05-28 15:09   ` Wei Liu
2013-06-11 10:06 ` David Vrabel
2013-06-11 10:15   ` Wei Liu
2013-06-12 13:44     ` Andrew Bennieston
2013-06-13  9:01       ` Wei Liu
2013-06-13 11:18         ` Andrew Bennieston
2013-06-13 13:06           ` Wei Liu
2013-07-03 12:45     ` Andrew Bennieston
2013-07-03 16:07       ` Wei Liu

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=51A4B2F7.2070500@citrix.com \
    --to=david.vrabel@citrix.com \
    --cc=annie.li@oracle.com \
    --cc=ian.campbell@citrix.com \
    --cc=konrad.wilk@oracle.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.