From: "Jan Beulich" <JBeulich@novell.com>
To: Dongxiao Xu <dongxiao.xu@intel.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
Steven Smith <steven.smith@citrix.com>,
KonradRzeszutek Wilk <konrad.wilk@oracle.com>
Subject: Re: [Pv-ops][PATCH 0/3 v3] Netback multiple threads support
Date: Tue, 04 May 2010 10:38:35 +0100 [thread overview]
Message-ID: <4BE0073B02000078000011E7@vpn.id2.novell.com> (raw)
In-Reply-To: <D5AB6E638E5A3E4B8F4406B113A5A19A1D94B446@shsmsx501.ccr.corp.intel.com>
>>> "Xu, Dongxiao" <dongxiao.xu@intel.com> 04.05.10 03:52 >>>
>1. Merge "group" and "idx" into "netif->mapping", therefore
>page_ext is not used now.
Open coding this seems very fragile (and even more using literal
constants in those code fragments).
I'm also not convinced restricting either part to 16 bits is a good thing
(particularly on 64-bits, where you could easily have each part use
32 bits).
>2. Put netbk_add_netif() and netbk_remove_netif() into
>__netif_up() and __netif_down().
An extra comment on top of what I said earlier: I don't think holding
the lock for the entire duration of the loop in netbk_add_netif() is
necessary - not doing so just makes the balancing slightly imprecise,
but reduces (on large systems) the spin lock holding time (perhaps
significantly).
If you don't, and if you instead make the netfront_count member
an atomic_t, you can eliminate the lock altogether I would think.
>4. Use __get_free_pages() to replace kzalloc().
This is only marginally better than kzalloc(). Why not vmalloc(), as
suggested?
>6. Use MODPARM_netback_kthread to determine whether using
>tasklet or kernel thread.
As a minor space optimization, the tasklet and kthread related
fields in struct xen_netbk could be put in a union.
>8. Add more checks in netif_page_release().
Actually, isn't
BUG_ON(!PageForeign(page));
checking just a subset of
BUG_ON(netbk->mmap_pages[idx] != page);
as all pages in those arrays would always be foreign?
Jan
next prev parent reply other threads:[~2010-05-04 9:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-04 1:52 [Pv-ops][PATCH 0/3 v3] Netback multiple threads support Xu, Dongxiao
2010-05-04 9:38 ` Jan Beulich [this message]
2010-05-04 11:36 ` Xu, Dongxiao
2010-05-04 12:10 ` Jan Beulich
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=4BE0073B02000078000011E7@vpn.id2.novell.com \
--to=jbeulich@novell.com \
--cc=dongxiao.xu@intel.com \
--cc=jeremy@goop.org \
--cc=konrad.wilk@oracle.com \
--cc=steven.smith@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).