All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH 1/3 net-next] e1000: Allocate pm_qos_req as needed
Date: Fri, 10 Apr 2015 10:01:59 +0200	[thread overview]
Message-ID: <55278377.8030505@iogearbox.net> (raw)
In-Reply-To: <1428640539.2729.67.camel@jtkirshe-mobl>

On 04/10/2015 06:35 AM, Jeff Kirsher wrote:
> On Thu, 2015-04-09 at 17:08 -0700, Jeff Kirsher wrote:
>> On Fri, 2015-04-10 at 01:43 +0200, Thomas Graf wrote:
>>> e1000 is the only driver requiring pm_qos_req, instead of causing
>>> every device to waste up to 240 bytes. Allocate it for the specific
>>> driver.
>>>
>>> Signed-off-by: Thomas Graf <tgraf@suug.ch>
>>> ---
>>>   drivers/net/ethernet/intel/e1000e/netdev.c | 15 +++++++++++----
>>>   include/linux/netdevice.h                  |  2 +-
>>>   2 files changed, 12 insertions(+), 5 deletions(-)
>>
>> Small nitpick, it is e1000e not e1000 that you are modifying.
>
> So other than the patch title and description referencing e1000 instead
> of e1000e, patch looks fine.
>
> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Thanks for working towards reducing struct net_device, that's awesome!

Wrt this patch, I'm wondering if that couldn't be pushed down into
struct e1000_adapter entirely?

Looks like e1000e is the only user of this, would save every other
net_device 8 more bytes:

$ git grep -n "\->pm_qos_req" drivers/net/
drivers/net/ethernet/intel/e1000e/netdev.c:3300:                pm_qos_update_request(&adapter->netdev->pm_qos_req, lat);
drivers/net/ethernet/intel/e1000e/netdev.c:3302:                pm_qos_update_request(&adapter->netdev->pm_qos_req,
drivers/net/ethernet/intel/e1000e/netdev.c:4406:        pm_qos_add_request(&adapter->netdev->pm_qos_req, PM_QOS_CPU_DMA_LATENCY,
drivers/net/ethernet/intel/e1000e/netdev.c:4517:        pm_qos_remove_request(&adapter->netdev->pm_qos_req);

Thanks,
Daniel

WARNING: multiple messages have this Message-ID (diff)
From: Daniel Borkmann <daniel@iogearbox.net>
To: Jeff Kirsher <jeffrey.t.kirsher@intel.com>, Thomas Graf <tgraf@suug.ch>
Cc: netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org,
	davem@davemloft.net, eric.dumazet@gmail.com
Subject: Re: [Intel-wired-lan] [PATCH 1/3 net-next] e1000: Allocate pm_qos_req as needed
Date: Fri, 10 Apr 2015 10:01:59 +0200	[thread overview]
Message-ID: <55278377.8030505@iogearbox.net> (raw)
In-Reply-To: <1428640539.2729.67.camel@jtkirshe-mobl>

On 04/10/2015 06:35 AM, Jeff Kirsher wrote:
> On Thu, 2015-04-09 at 17:08 -0700, Jeff Kirsher wrote:
>> On Fri, 2015-04-10 at 01:43 +0200, Thomas Graf wrote:
>>> e1000 is the only driver requiring pm_qos_req, instead of causing
>>> every device to waste up to 240 bytes. Allocate it for the specific
>>> driver.
>>>
>>> Signed-off-by: Thomas Graf <tgraf@suug.ch>
>>> ---
>>>   drivers/net/ethernet/intel/e1000e/netdev.c | 15 +++++++++++----
>>>   include/linux/netdevice.h                  |  2 +-
>>>   2 files changed, 12 insertions(+), 5 deletions(-)
>>
>> Small nitpick, it is e1000e not e1000 that you are modifying.
>
> So other than the patch title and description referencing e1000 instead
> of e1000e, patch looks fine.
>
> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Thanks for working towards reducing struct net_device, that's awesome!

Wrt this patch, I'm wondering if that couldn't be pushed down into
struct e1000_adapter entirely?

Looks like e1000e is the only user of this, would save every other
net_device 8 more bytes:

$ git grep -n "\->pm_qos_req" drivers/net/
drivers/net/ethernet/intel/e1000e/netdev.c:3300:                pm_qos_update_request(&adapter->netdev->pm_qos_req, lat);
drivers/net/ethernet/intel/e1000e/netdev.c:3302:                pm_qos_update_request(&adapter->netdev->pm_qos_req,
drivers/net/ethernet/intel/e1000e/netdev.c:4406:        pm_qos_add_request(&adapter->netdev->pm_qos_req, PM_QOS_CPU_DMA_LATENCY,
drivers/net/ethernet/intel/e1000e/netdev.c:4517:        pm_qos_remove_request(&adapter->netdev->pm_qos_req);

Thanks,
Daniel

  reply	other threads:[~2015-04-10  8:01 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-09 23:43 [Intel-wired-lan] [PATCH 0/3 net-next] Bring sizeof(net_device) down to < 2K bytes Thomas Graf
2015-04-09 23:43 ` Thomas Graf
2015-04-09 23:43 ` [Intel-wired-lan] [PATCH 1/3 net-next] e1000: Allocate pm_qos_req as needed Thomas Graf
2015-04-09 23:43   ` Thomas Graf
2015-04-10  0:08   ` [Intel-wired-lan] " Jeff Kirsher
2015-04-10  0:08     ` Jeff Kirsher
2015-04-10  4:35     ` [Intel-wired-lan] " Jeff Kirsher
2015-04-10  4:35       ` Jeff Kirsher
2015-04-10  8:01       ` Daniel Borkmann [this message]
2015-04-10  8:01         ` Daniel Borkmann
2015-04-10  8:48         ` Thomas Graf
2015-04-10  8:48           ` Thomas Graf
2015-04-10  8:58           ` Jeff Kirsher
2015-04-10  8:58             ` Jeff Kirsher
2015-04-09 23:43 ` [Intel-wired-lan] [PATCH 2/3 net-next] net_device: Reorder members to fill holes Thomas Graf
2015-04-09 23:43   ` Thomas Graf
2015-04-09 23:43 ` [Intel-wired-lan] [PATCH 3/3 net-next] net_device: Add minimal padding to allow for net_device pointer alignment Thomas Graf
2015-04-09 23:43   ` Thomas Graf
2015-04-10  0:34   ` [Intel-wired-lan] " Eric Dumazet
2015-04-10  0:34     ` Eric Dumazet
2015-04-10  8:48     ` [Intel-wired-lan] " Thomas Graf
2015-04-10  8:48       ` Thomas Graf
2015-04-10  9:03       ` [Intel-wired-lan] " Eric Dumazet
2015-04-10  9:03         ` Eric Dumazet
2015-04-10  0:01 ` [Intel-wired-lan] [PATCH 0/3 net-next] Bring sizeof(net_device) down to < 2K bytes Alexei Starovoitov
2015-04-10  0:01   ` Alexei Starovoitov
2015-04-10  8:41   ` [Intel-wired-lan] " Thomas Graf
2015-04-10  8:41     ` Thomas Graf

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=55278377.8030505@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=intel-wired-lan@osuosl.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.