<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/core/sock.c, branch linux-2.6.24.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.24.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.24.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2007-11-13T05:24:14Z</updated>
<entry>
<title>[NET]: Unexport sysctl_{r,w}mem_max.</title>
<updated>2007-11-13T05:24:14Z</updated>
<author>
<name>Adrian Bunk</name>
</author>
<published>2007-11-13T05:24:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6aed42159db1f99e83ccf17b1aa1a83bc75ac3e8'/>
<id>urn:sha1:6aed42159db1f99e83ccf17b1aa1a83bc75ac3e8</id>
<content type='text'>
sysctl_{r,w}mem_max can now be unexported.

Signed-off-by: Adrian Bunk &lt;bunk@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NET]: Clean proto_(un)register from in-code ifdefs</title>
<updated>2007-11-07T12:15:04Z</updated>
<author>
<name>Pavel Emelyanov</name>
</author>
<published>2007-11-07T10:23:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b733c007edad6f3e05109951bacc6f87dd807917'/>
<id>urn:sha1:b733c007edad6f3e05109951bacc6f87dd807917</id>
<content type='text'>
The struct proto has the per-cpu "inuse" counter, which is handled
with a special care. All the handling code hides under the ifdef
CONFIG_SMP and it introduces some code duplication and makes it
look worse than it could.

Clean this.

Signed-off-by: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NET]: Define infrastructure to keep 'inuse' changes in an efficent SMP/NUMA way.</title>
<updated>2007-11-07T12:08:57Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2007-11-06T07:38:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=286ab3d46058840d68e5d7d52e316c1f7e98c59f'/>
<id>urn:sha1:286ab3d46058840d68e5d7d52e316c1f7e98c59f</id>
<content type='text'>
"struct proto" currently uses an array stats[NR_CPUS] to track change on
'inuse' sockets per protocol.

If NR_CPUS is big, this means we use a big memory area for this.
Moreover, all this memory area is located on a single node on NUMA
machines, increasing memory pressure on the boot node.

In this patch, I tried to :

- Keep a fast !CONFIG_SMP implementation
- Keep a fast CONFIG_SMP implementation for often used protocols
(tcp,udp,raw,...)
- Introduce a NUMA efficient implementation

Some helper macros are defined in include/net/sock.h
These macros take into account CONFIG_SMP

If a "struct proto" is declared without using DEFINE_PROTO_INUSE /
REF_PROTO_INUSE
macros, it will automatically use a default implementation, using a
dynamically allocated percpu zone.
This default implementation will be NUMA efficient, but might use 32/64
bytes per possible cpu
because of current alloc_percpu() implementation.
However it still should be better than previous implementation based on
stats[NR_CPUS] field.

When a "struct proto" is changed to use the new macros, we use a single
static "int" percpu variable,
lowering the memory and cpu costs, still preserving NUMA efficiency.

Signed-off-by: Eric Dumazet &lt;dada1@cosmosbay.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NET]: Forget the zero_it argument of sk_alloc()</title>
<updated>2007-11-01T07:39:31Z</updated>
<author>
<name>Pavel Emelyanov</name>
</author>
<published>2007-11-01T07:39:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6257ff2177ff02d7f260a7a501876aa41cb9a9f6'/>
<id>urn:sha1:6257ff2177ff02d7f260a7a501876aa41cb9a9f6</id>
<content type='text'>
Finally, the zero_it argument can be completely removed from
the callers and from the function prototype.

Besides, fix the checkpatch.pl warnings about using the
assignments inside if-s.

This patch is rather big, and it is a part of the previous one.
I splitted it wishing to make the patches more readable. Hope 
this particular split helped.

Signed-off-by: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NET]: Remove bogus zero_it argument from sk_alloc</title>
<updated>2007-11-01T07:38:43Z</updated>
<author>
<name>Pavel Emelyanov</name>
</author>
<published>2007-11-01T07:38:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=154adbc8469ff21fbf5c958446ee92dbaab01be1'/>
<id>urn:sha1:154adbc8469ff21fbf5c958446ee92dbaab01be1</id>
<content type='text'>
At this point nobody calls the sk_alloc(() with zero_it == 0,
so remove unneeded checks from it.

Signed-off-by: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NET]: Make the sk_clone() lighter</title>
<updated>2007-11-01T07:37:32Z</updated>
<author>
<name>Pavel Emelyanov</name>
</author>
<published>2007-11-01T07:37:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8fd1d178a3f177777707ee782f12d93e9a7eb5e5'/>
<id>urn:sha1:8fd1d178a3f177777707ee782f12d93e9a7eb5e5</id>
<content type='text'>
The sk_prot_alloc() already performs all the stuff needed by the
sk_clone(). Besides, the sk_prot_alloc() requires almost twice
less arguments than the sk_alloc() does, so call the sk_prot_alloc()
saving the stack a bit.

Signed-off-by: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NET]: Move some core sock setup into sk_prot_alloc</title>
<updated>2007-11-01T07:36:26Z</updated>
<author>
<name>Pavel Emelyanov</name>
</author>
<published>2007-11-01T07:36:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2e4afe7b35458beedba418a6e2aaf0b0ac82cc18'/>
<id>urn:sha1:2e4afe7b35458beedba418a6e2aaf0b0ac82cc18</id>
<content type='text'>
The security_sk_alloc() and the module_get is a part of the
object allocations - move it in the proper place.

Note, that since we do not reset the newly allocated sock
in the sk_alloc() (memset() is removed with the previous
patch) we can safely do this.

Also fix the error path in sk_prot_alloc() - release the security
context if needed.

Signed-off-by: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NET]: Auto-zero the allocated sock object</title>
<updated>2007-11-01T07:34:42Z</updated>
<author>
<name>Pavel Emelyanov</name>
</author>
<published>2007-11-01T07:34:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3f0666ee3039443fa7b7cf436dd16ce0dd8e3f95'/>
<id>urn:sha1:3f0666ee3039443fa7b7cf436dd16ce0dd8e3f95</id>
<content type='text'>
We have a __GFP_ZERO flag that allocates a zeroed chunk of memory.
Use it in the sk_alloc() and avoid a hand-made memset().

This is a temporary patch that will help us in the nearest future :)

Signed-off-by: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NET]: Cleanup the allocation/freeing of the sock object</title>
<updated>2007-11-01T07:33:50Z</updated>
<author>
<name>Pavel Emelyanov</name>
</author>
<published>2007-11-01T07:33:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c308c1b20e2eb7b13f200a7c18b3f23561318367'/>
<id>urn:sha1:c308c1b20e2eb7b13f200a7c18b3f23561318367</id>
<content type='text'>
The sock object is allocated either from the generic cache with
the kmalloc, or from the proc-&gt;slab cache.

Move this logic into an isolated set of helpers and make the
sk_alloc/sk_free look a bit nicer.

Signed-off-by: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NET]: Move the get_net() from sock_copy()</title>
<updated>2007-11-01T07:31:26Z</updated>
<author>
<name>Pavel Emelyanov</name>
</author>
<published>2007-11-01T07:31:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1e2e6b89f1d3152da0606d23e65e8760bf62a4c3'/>
<id>urn:sha1:1e2e6b89f1d3152da0606d23e65e8760bf62a4c3</id>
<content type='text'>
The sock_copy() is supposed to just clone the socket. In a perfect
world it has to be just memcpy, but we have to handle the security
mark correctly. All the extra setup must be performed in sk_clone() 
call, so move the get_net() into more proper place.

Signed-off-by: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
