[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20071224.205809.56016548.davem@davemloft.net>
Date: Mon, 24 Dec 2007 20:58:09 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: dada1@...mosbay.com
Cc: netdev@...r.kernel.org
Subject: Re: [SOCK] Avoid divides in sk_stream_pages() and
__sk_stream_mem_reclaim()
From: Eric Dumazet <dada1@...mosbay.com>
Date: Fri, 21 Dec 2007 15:45:08 +0100
> [SOCK] Avoid divides in sk_stream_pages() and __sk_stream_mem_reclaim()
>
> sk_forward_alloc being signed, we should take care of divides by
> SK_STREAM_MEM_QUANTUM we do in sk_stream_pages() and
> __sk_stream_mem_reclaim()
>
> This patchs introduces SK_STREAM_MEM_QUANTUM_SHIFT, defined
> as ilog2(SK_STREAM_MEM_QUANTUM), to be able to use right
> shifts instead of plain divides.
>
> This should help compiler to choose right shifts instead of
> expensive divides (as seen with CONFIG_CC_OPTIMIZE_FOR_SIZE=y on x86)
>
> Signed-off-by: Eric Dumazet <dada1@...mosbay.com>
Applied, thanks Eric.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists