[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <476B5AC0.9060604@cosmosbay.com>
Date: Fri, 21 Dec 2007 07:18:40 +0100
From: Eric Dumazet <dada1@...mosbay.com>
To: "David S. Miller" <davem@...emloft.net>
CC: Linux Netdev List <netdev@...r.kernel.org>
Subject: [SOCK] Avoid integer divides where not necessary in include/net/sock.h
Because sk_wmem_queued, sk_sndbuf are signed, a divide per two
forces compiler to use an integer divide. We can instead use
a right shift.
SK_STREAM_MEM_QUANTUM deserves to be declared as an unsigned
quantity, so that sk_stream_pages() and __sk_stream_mem_reclaim()
can use right shifts instead of integer divides.
Signed-off-by: Eric Dumazet <dada1@...mosbay.com>
View attachment "sock_h.patch" of type "text/plain" (1481 bytes)
Powered by blists - more mailing lists