From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH net-next v2] net: core: change bool members of struct net_device to bitfield members Date: Tue, 9 Oct 2018 14:43:27 -0600 Message-ID: References: <35349fe9-94ac-e2d0-f02c-078c9fd58090@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: "netdev@vger.kernel.org" , David Laight To: Heiner Kallweit , David Miller Return-path: Received: from mail-pg1-f196.google.com ([209.85.215.196]:33205 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725748AbeJJECO (ORCPT ); Wed, 10 Oct 2018 00:02:14 -0400 Received: by mail-pg1-f196.google.com with SMTP id y18-v6so1402930pge.0 for ; Tue, 09 Oct 2018 13:43:29 -0700 (PDT) In-Reply-To: Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 10/9/18 2:24 PM, Heiner Kallweit wrote: > Reordering the struct members to fill the holes could be a little tricky > and could have side effects because it may make a performance difference > whether certain members are in one cacheline or not. > And whether it's worth to spend this effort (incl. the related risks) > just to save a few bytes (also considering that typically we have quite > few instances of struct net_device)? > It would be good to get net_device below 2048 without affecting performance. Anything else is just moving elements around for the same end allocation (rounds up to 4096).