[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <495A5C3C.8090006@vlnb.net>
Date: Tue, 30 Dec 2008 20:37:00 +0300
From: Vladislav Bolkhovitin <vst@...b.net>
To: Evgeniy Polyakov <zbr@...emap.net>
CC: Herbert Xu <herbert@...dor.apana.org.au>,
Jeremy Fitzhardinge <jeremy@...p.org>,
linux-scsi@...r.kernel.org,
James Bottomley <James.Bottomley@...senPartnership.com>,
Andrew Morton <akpm@...ux-foundation.org>,
FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>,
Mike Christie <michaelc@...wisc.edu>,
Jeff Garzik <jeff@...zik.org>,
Boaz Harrosh <bharrosh@...asas.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-kernel@...r.kernel.org, scst-devel@...ts.sourceforge.net,
Bart Van Assche <bart.vanassche@...il.com>,
"Nicholas A. Bellinger" <nab@...ux-iscsi.org>,
netdev@...r.kernel.org, Rusty Russell <rusty@...tcorp.com.au>,
David Miller <davem@...emloft.net>,
Alexey Kuznetsov <kuznet@....inr.ac.ru>
Subject: Re: [PATCH][RFC 23/23]: Support for zero-copy TCP transmit of user
space data
Evgeniy Polyakov, on 12/24/2008 09:08 PM wrote:
> On Wed, Dec 24, 2008 at 08:46:56PM +0300, Vladislav Bolkhovitin (vst@...b.net) wrote:
>> I think in most cases there would be possibility to embed
>> sk_transaction_token to some higher level structure. E.g. Xen apparently
>> should have something to track packets passed through host/guest
>> boundary. From other side, kmem cache is too well polished to have much
>> overhead. I doubt, you would even notice it in this application. In most
>> cases allocation of such small object in it using SLUB is just about the
>> same as a list_del() under disabled IRQs.
>
> I definitely would not rely on that, especially at cache reclaim time.
> But it of course depends on the workload and maybe appropriate for the
> cases in question. The best solution I think is to combine tag and
> separate destructur, so that those who do not want to allocate a token
> could still get notification via destructor callback.
Although I agree that any additional allocation is something, which
should be avoided, *if possible*. But you shouldn't overestimate the
overhead of the sk_transaction_token allocation in cases, when it would
be needed. At first, sk_transaction_token is quite small, so a single
page in the kmem cache would keep about 100 of them, hence the slow
allocation path would be called only once per 100 objects. Second, in
many cases ->sendpages() needs to allocate a new skb, so already there
is at least one such allocations on the fast path.
Actually, it doesn't look like the skb shared info destructor alone
can't solve the task we are solving, because we need to know not when an
skb transmittion finished, but when transmittion of our *set of pages*
finished. Hence, with skb shared info destructor we would need also to
invent some way to track set of pages <-> set of skbs translation (you
refer it as combining tag and separate destructor), which would bring
this solution on the entire new complexity level for no gain over the
sk_transaction_token solution.
Thanks,
Vlad
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists