From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH v2 net-next af-packet 1/2] Enhance af-packet to provide (near zero)lossless packet capture functionality. Date: Thu, 07 Jul 2011 06:11:59 -0700 (PDT) Message-ID: <20110707.061159.1960862007945782564.davem@davemloft.net> References: <20110707.001301.1054777374178479078.davem@davemloft.net> Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: netdev@vger.kernel.org, eric.dumazet@gmail.com, joe@perches.com, bhutchings@solarflare.com, shemminger@vyatta.com, linux-kernel@vger.kernel.org To: loke.chetan@gmail.com Return-path: Received: from shards.monkeyblade.net ([198.137.202.13]:40277 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755577Ab1GGNMG convert rfc822-to-8bit (ORCPT ); Thu, 7 Jul 2011 09:12:06 -0400 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: =46rom: chetan loke Date: Thu, 7 Jul 2011 09:04:58 -0400 > On Thu, Jul 7, 2011 at 3:13 AM, David Miller wr= ote: >=20 >> Get rid of __packed__, it's going to kill performance on RISC >> platforms. =A0If you use __packed__, regardless of the actual alignm= ent, >=20 > The performance boost has been achieved by amortizing the cost of > static spin-wait/poll and not by shrinking the data-set. Chetan, if you're implementing something for performance reasons, getting rid of packed is non-negotiable. We pass data structures between userspace and the kernel all the time, and without __packed__. We have mechanisms to ensure the size of the individual data types, and we have mechanisms to make sure 64-bit datums get aligned even on x86 (see "aligned_u64" and friends") Again, I can't seriously consider your patch if you keep the packed attribute crap in there.