On Mon, Mar 06, 2006 at 04:25:32PM -0800, David S. Miller wrote:
> Wait...
>
> what about "test_and_clear_bit()"?
>
> Most implementations should be doing the light-weight test _first_,
> and only do the update if the bit isn't in the state desired.
>
> I think in such cases we can elide the mem
From: Benjamin LaHaise <[EMAIL PROTECTED]>
Date: Mon, 6 Mar 2006 16:09:07 -0800
> I'll respin it with the
> fast_clear_bit() suggestion.
Please see my other email first, we may be able to do something
even better via test_and_*_bit().
-
To unsubscribe from this list: send the line "unsubscribe n
From: Benjamin LaHaise <[EMAIL PROTECTED]>
Date: Mon, 6 Mar 2006 15:40:31 -0800
> On Mon, Mar 06, 2006 at 08:29:30PM -0300, Arnaldo Carvalho de Melo wrote:
> > - clear_bit(SOCK_ASYNC_NOSPACE, &sk->sk_socket->flags);
> > + if (test_bit(SOCK_ASYNC_NOSPACE, &sk->sk_socket->flags))
> > +
On Tue, Mar 07, 2006 at 12:59:17AM +0100, Eric Dumazet wrote:
> I'm not even sure this 'optimization' is valid on UP.
It can be, as branch prediction makes the test essentially free. The real
answer is that it depends on the CPU, how much pressure there is on the write
combining buffers and reo
Arnaldo Carvalho de Melo a écrit :
On 3/6/06, David S. Miller <[EMAIL PROTECTED]> wrote:
From: Benjamin LaHaise <[EMAIL PROTECTED]>
Date: Mon, 6 Mar 2006 15:06:41 -0800
This patch removes a couple of memory barriers from atomic bitops that
showed up on profiles of netperf.
A little ugly, we s
On Mon, Mar 06, 2006 at 08:29:30PM -0300, Arnaldo Carvalho de Melo wrote:
> - clear_bit(SOCK_ASYNC_NOSPACE, &sk->sk_socket->flags);
> + if (test_bit(SOCK_ASYNC_NOSPACE, &sk->sk_socket->flags))
> + clear_bit(SOCK_ASYNC_NOSPACE, &sk->sk_socket->flags);
>
> Something like fa
On 3/6/06, David S. Miller <[EMAIL PROTECTED]> wrote:
> From: Benjamin LaHaise <[EMAIL PROTECTED]>
> Date: Mon, 6 Mar 2006 15:06:41 -0800
>
> > This patch removes a couple of memory barriers from atomic bitops that
> > showed up on profiles of netperf.
>
> A little ugly, we should have a nicer way
From: Benjamin LaHaise <[EMAIL PROTECTED]>
Date: Mon, 6 Mar 2006 15:06:41 -0800
> This patch removes a couple of memory barriers from atomic bitops that
> showed up on profiles of netperf.
A little ugly, we should have a nicer way to do this
generically.
-
To unsubscribe from this list: send the