projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d436d68
)
[PATCH] use SK_MEM_QUANTUM_SHIFT in __sk_mem_reclaim()
author
Eric Dumazet
<dada1@cosmosbay.com>
Mon, 31 Dec 2007 23:00:50 +0000
(15:00 -0800)
committer
David S. Miller
<davem@davemloft.net>
Mon, 28 Jan 2008 23:00:27 +0000
(15:00 -0800)
Avoid an expensive divide (as done in commit
18030477e70a826b91608aee40a987bbd368fec6
but lost in commit
23821d2653111d20e75472c8c5003df1a55309a8
)
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/sock.c
patch
|
blob
|
blame
|
history
diff --git
a/net/core/sock.c
b/net/core/sock.c
index 8c184c4a381120d497a0e0e9cb8a650c7519a09e..3804e7df626b45cf48b40727d710a0db5cccc30d 100644
(file)
--- a/
net/core/sock.c
+++ b/
net/core/sock.c
@@
-1476,7
+1476,7
@@
void __sk_mem_reclaim(struct sock *sk)
{
struct proto *prot = sk->sk_prot;
- atomic_sub(sk->sk_forward_alloc
/ SK_MEM_QUANTUM
,
+ atomic_sub(sk->sk_forward_alloc
>> SK_MEM_QUANTUM_SHIFT
,
prot->memory_allocated);
sk->sk_forward_alloc &= SK_MEM_QUANTUM - 1;