Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=680a5a5086443b9547b32b04f40af8f9d717f711
Commit:     680a5a5086443b9547b32b04f40af8f9d717f711
Parent:     d436d68630a74ba3c898ff1b53591ddc4eb7f2bf
Author:     Eric Dumazet <[EMAIL PROTECTED]>
AuthorDate: Mon Dec 31 15:00:50 2007 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Jan 28 15:00:27 2008 -0800

    [PATCH] use SK_MEM_QUANTUM_SHIFT in __sk_mem_reclaim()
    
    Avoid an expensive divide (as done in commit
    18030477e70a826b91608aee40a987bbd368fec6 but lost in commit
    23821d2653111d20e75472c8c5003df1a55309a8)
    
    Signed-off-by: Eric Dumazet <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/core/sock.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/core/sock.c b/net/core/sock.c
index 8c184c4..3804e7d 100644
--- 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;
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to