lkml.org 
[lkml]   [2006]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Synchronizing Bit operations V2
On Fri, 31 Mar 2006, Andi Kleen wrote:

> > Powerpc can do similar things AFAIK. Not sure what other arches have
> > finer grained control over barriers but it could cover a lot of special
> > cases for other processors as well.
>
> Yes, but I don't think the goal of a portable atomic operations API
> in Linux is it to cover everybody's special case in every possible
> combination. The goal is to have an abstraction that will lead to
> portable code. I don't think your proposal will do this.

AFAIK The goal of a bitmap operations API (we are not talking about atomic
operations here) is to make bitmap operations as efficient as possible and
as simple as possible. We already have multiple special cases for each
bitmap operation

I.e.

clear_bit()
__clear_bit()

and some people talk abouit

clear_bit_lock()
clear_bit_unlock()

What I am prosing is to do one clear_bit_mode function that can take a
parameter customizing its synchronization behavior.

clear_bit_mode(bit,addr,mode)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-03-31 19:58    [W:0.287 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site