lkml.org 
[lkml]   [1999]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: PATCH killing dead code and design errors in pre6
From
Date
In article <369CC886.E9431AC9@cs.net.pl>,
Marcin Dalecki <dalecki@cs.net.pl> writes:

> If you had really readed through the patch you should see why the only
> usage
> of it in skbuff was bogous due to the fact that the results of the
> implyed
> constructor call (omitted due to reusal or not) gets just overwritten by
> the
> copy operation just shortly after it. Did you spot the memcpy(new_skb,
> orig_skb) ?

That is only in skb_clone, not in alloc_skb.

> This is an generic example of case where the logic behind the implyed
> constructors
> is just getting into way: CLONING OF OBJECTS.

You might not have noticed it, but most skbs are allocated, not cloned.
It is especially important for the fast routing path, which is totally
memory bound (when several 100Mbit/s busmastering ethernet cards are active
the CPU cache isn't of much use anymore because it is invalidated so often).
The improvements on forwarding performance was the main reason why the slab
skb patch was added.

Also: in the middle of 2.1 there was a nice fork time optimization (it got
unfortunately thrown out again by the half-finished changes for bigger NR_OPEN
support, but I plan to resubmit them for 2.3). With clever use of the constructor
it is possible to avoid the copying of the files array on forking for most cases.

-Andi


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.053 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site