* [PATCH] skbuff: remove unused dma_head & dma_maps fields
@ 2010-03-24 6:40 Jeff Kirsher
2010-03-24 6:48 ` Eric Dumazet
0 siblings, 1 reply; 3+ messages in thread
From: Jeff Kirsher @ 2010-03-24 6:40 UTC (permalink / raw)
To: davem; +Cc: netdev, gospo, Alexander Duyck, Jeff Kirsher
From: Alexander Duyck <alexander.h.duyck@intel.com>
The dma map fields in the skb_shared_info structure no longer has any users
and can be dropped since it is making the skb_shared_info unecessarily larger.
Running slabtop show that we were using 4K slabs for the skb->head on x86_64 w/
an allocation size of 1522. It turns out that the dma_head and dma_maps array
made skb_shared large enough that we had crossed over the 2k boundary with
standard frames and as such we were using 4k blocks of memory for all skbs.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
include/linux/skbuff.h | 6 ------
1 files changed, 0 insertions(+), 6 deletions(-)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 03f816a..124f90c 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -190,9 +190,6 @@ struct skb_shared_info {
atomic_t dataref;
unsigned short nr_frags;
unsigned short gso_size;
-#ifdef CONFIG_HAS_DMA
- dma_addr_t dma_head;
-#endif
/* Warning: this field is not always filled in (UFO)! */
unsigned short gso_segs;
unsigned short gso_type;
@@ -201,9 +198,6 @@ struct skb_shared_info {
struct sk_buff *frag_list;
struct skb_shared_hwtstamps hwtstamps;
skb_frag_t frags[MAX_SKB_FRAGS];
-#ifdef CONFIG_HAS_DMA
- dma_addr_t dma_maps[MAX_SKB_FRAGS];
-#endif
/* Intermediate layers must ensure that destructor_arg
* remains valid until skb destructor */
void * destructor_arg;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] skbuff: remove unused dma_head & dma_maps fields
2010-03-24 6:40 [PATCH] skbuff: remove unused dma_head & dma_maps fields Jeff Kirsher
@ 2010-03-24 6:48 ` Eric Dumazet
2010-03-24 18:13 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Eric Dumazet @ 2010-03-24 6:48 UTC (permalink / raw)
To: Jeff Kirsher; +Cc: davem, netdev, gospo, Alexander Duyck
Le mardi 23 mars 2010 à 23:40 -0700, Jeff Kirsher a écrit :
> From: Alexander Duyck <alexander.h.duyck@intel.com>
>
> The dma map fields in the skb_shared_info structure no longer has any users
> and can be dropped since it is making the skb_shared_info unecessarily larger.
>
> Running slabtop show that we were using 4K slabs for the skb->head on x86_64 w/
> an allocation size of 1522. It turns out that the dma_head and dma_maps array
> made skb_shared large enough that we had crossed over the 2k boundary with
> standard frames and as such we were using 4k blocks of memory for all skbs.
>
> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> ---
>
Thanks a lot for doing this cleanup !
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] skbuff: remove unused dma_head & dma_maps fields
2010-03-24 6:48 ` Eric Dumazet
@ 2010-03-24 18:13 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2010-03-24 18:13 UTC (permalink / raw)
To: eric.dumazet; +Cc: jeffrey.t.kirsher, netdev, gospo, alexander.h.duyck
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 24 Mar 2010 07:48:06 +0100
> Le mardi 23 mars 2010 à 23:40 -0700, Jeff Kirsher a écrit :
>> From: Alexander Duyck <alexander.h.duyck@intel.com>
>>
>> The dma map fields in the skb_shared_info structure no longer has any users
>> and can be dropped since it is making the skb_shared_info unecessarily larger.
>>
>> Running slabtop show that we were using 4K slabs for the skb->head on x86_64 w/
>> an allocation size of 1522. It turns out that the dma_head and dma_maps array
>> made skb_shared large enough that we had crossed over the 2k boundary with
>> standard frames and as such we were using 4k blocks of memory for all skbs.
>>
>> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
>> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> ---
>>
>
> Thanks a lot for doing this cleanup !
>
> Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Yep, thanks indeed. Applied!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-03-24 18:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-24 6:40 [PATCH] skbuff: remove unused dma_head & dma_maps fields Jeff Kirsher
2010-03-24 6:48 ` Eric Dumazet
2010-03-24 18:13 ` David Miller
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.