netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zoltan Kiss <zoltan.kiss@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: <ian.campbell@citrix.com>, <jonathan.davies@citrix.com>,
	<wei.liu2@citrix.com>, <xen-devel@lists.xenproject.org>,
	<linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>
Subject: Re: [Xen-devel] [PATCH net-next RFC 1/5] xen-netback: Introduce TX grant map definitions
Date: Thu, 31 Oct 2013 19:22:27 +0000	[thread overview]
Message-ID: <5272ADF3.2000301@citrix.com> (raw)
In-Reply-To: <5270DF3602000078000FDFBE@nat28.tlf.novell.com>

On 30/10/13 09:28, Jan Beulich wrote:
>>>> On 30.10.13 at 01:50, Zoltan Kiss <zoltan.kiss@citrix.com> wrote:
>> @@ -119,13 +126,22 @@ struct xenvif {
>>   	pending_ring_idx_t pending_cons;
>>   	u16 pending_ring[MAX_PENDING_REQS];
>>   	struct pending_tx_info pending_tx_info[MAX_PENDING_REQS];
>> +	grant_handle_t grant_tx_handle[MAX_PENDING_REQS];
>>
>>   	/* Coalescing tx requests before copying makes number of grant
>>   	 * copy ops greater or equal to number of slots required. In
>>   	 * worst case a tx request consumes 2 gnttab_copy.
>>   	 */
>>   	struct gnttab_copy tx_copy_ops[2*MAX_PENDING_REQS];
>> +	struct gnttab_unmap_grant_ref tx_unmap_ops[MAX_PENDING_REQS];
>> +	struct gnttab_map_grant_ref tx_map_ops[MAX_PENDING_REQS];
>> +	/* passed to gnttab_[un]map_refs with pages under (un)mapping */
>> +	struct page *pages_to_gnt[MAX_PENDING_REQS];
>
> I think you will want to try to limit the structure size here by putting
> things into unions that can't be used at the same time: Without
> having looked at the later patches yet, it seems quite unlikely that
> map and unmap can be used simultaneously. And the total of copy
> and map can't also be used at the same time, as for each pending
> request you would use either up to two copy slots or a single map
> slot. I didn't look for further opportunities of sharing space.

Indeed, map and unmap can't be done at the same time, so it's safe to 
put them into union. But I'm afraid grant_tx_handle and pages_to_gnt 
can't share space with other members.
tx_copy_ops is a different topic, let's discuss that in it's own thread ...

Thanks,

Zoli

  reply	other threads:[~2013-10-31 19:22 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-30  0:50 [PATCH net-next RFC 0/5] xen-netback: TX grant mapping instead of copy Zoltan Kiss
2013-10-30  0:50 ` [PATCH net-next RFC 1/5] xen-netback: Introduce TX grant map definitions Zoltan Kiss
2013-10-30  9:28   ` [Xen-devel] " Jan Beulich
2013-10-31 19:22     ` Zoltan Kiss [this message]
2013-10-31 19:33   ` Zoltan Kiss
2013-10-30  0:50 ` [PATCH net-next RFC 2/5] xen-netback: Change TX path from grant copy to mapping Zoltan Kiss
2013-10-30  9:11   ` [Xen-devel] " Paul Durrant
2013-10-30 21:10     ` Zoltan Kiss
2013-11-01 16:09       ` Zoltan Kiss
2013-10-30  0:50 ` [PATCH net-next RFC 3/5] xen-netback: Remove old TX grant copy definitons Zoltan Kiss
2013-10-30  9:39   ` [Xen-devel] " Jan Beulich
2013-10-31 19:46     ` Zoltan Kiss
2013-10-30 11:13   ` Wei Liu
2013-10-30  0:50 ` [PATCH net-next RFC 4/5] xen-netback: Fix indentations Zoltan Kiss
2013-10-30 11:13   ` Wei Liu
2013-10-31 19:48     ` Zoltan Kiss
2013-10-30  0:50 ` [PATCH net-next RFC 4/5] xen-netback: Change RX path for mapped SKB fragments Zoltan Kiss
2013-10-30 19:16 ` [Xen-devel] [PATCH net-next RFC 0/5] xen-netback: TX grant mapping instead of copy Konrad Rzeszutek Wilk
2013-10-30 19:17   ` Konrad Rzeszutek Wilk
2013-10-30 21:14     ` Zoltan Kiss
2013-11-01 10:50 ` Ian Campbell
2013-11-01 19:00   ` Zoltan Kiss
2013-11-05 17:01     ` Zoltan Kiss
2013-11-07 10:52     ` Ian Campbell
2013-11-28 17:37       ` Zoltan Kiss
2013-11-28 17:43         ` Ian Campbell
2013-12-12 22:08           ` Zoltan Kiss
2013-12-16 10:14             ` Ian Campbell

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=5272ADF3.2000301@citrix.com \
    --to=zoltan.kiss@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=ian.campbell@citrix.com \
    --cc=jonathan.davies@citrix.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.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 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).