netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RT metric sharing...
@ 2009-12-10 22:14 David Miller
  2009-12-11  0:22 ` Eric Dumazet
  0 siblings, 1 reply; 2+ messages in thread
From: David Miller @ 2009-12-10 22:14 UTC (permalink / raw)
  To: netdev


This topic has come up a few times, but I had a reason to
consider it again.

The routing metrics take up quite a bit of space in the
dst_entry and thus every routing cache entry.

We could save some space with indirection.

Basically my idea is:

1) dst_metrics are maintained in external structure

2) when cache entry is created, read-only dst_metrics object
   is allocated for it

3) any attempt to change the metrics of such a read-only dst_entry
   cow's it, all further writes proceed as normal

We currently have 13 (so 13 * sizeof(u32) == 52) and we're probably
about to get a 14th (for the initial receive window stuff).


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: RT metric sharing...
  2009-12-10 22:14 RT metric sharing David Miller
@ 2009-12-11  0:22 ` Eric Dumazet
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Dumazet @ 2009-12-11  0:22 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

Le 10/12/2009 23:14, David Miller a écrit :
> 
> This topic has come up a few times, but I had a reason to
> consider it again.
> 
> The routing metrics take up quite a bit of space in the
> dst_entry and thus every routing cache entry.
> 
> We could save some space with indirection.
> 
> Basically my idea is:
> 
> 1) dst_metrics are maintained in external structure
> 
> 2) when cache entry is created, read-only dst_metrics object
>    is allocated for it
> 
> 3) any attempt to change the metrics of such a read-only dst_entry
>    cow's it, all further writes proceed as normal
> 
> We currently have 13 (so 13 * sizeof(u32) == 52) and we're probably
> about to get a 14th (for the initial receive window stuff).
> 

Nice idea Dave.

(Note : we do have a hole available for the 14th metric
because of forced __refcnt alignement)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-12-11  0:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-10 22:14 RT metric sharing David Miller
2009-12-11  0:22 ` Eric Dumazet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).