[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOS58YOKUq7GTTZRcw19dth+HgThoNTEcqBKeNO0ftB4rFJ97A@mail.gmail.com>
Date: Thu, 26 Apr 2012 15:22:33 -0700
From: Tejun Heo <tj@...nel.org>
To: Glauber Costa <glommer@...allels.com>
Cc: cgroups@...r.kernel.org, netdev@...r.kernel.org,
Li Zefan <lizefan@...wei.com>, kamezawa.hiroyu@...fujitsu.com,
linux-mm@...ck.org, devel@...nvz.org
Subject: Re: [PATCH v3 2/2] decrement static keys on real destroy time
Hello,
On Thu, Apr 26, 2012 at 3:17 PM, Glauber Costa <glommer@...allels.com> wrote:
>
>> No, what I mean is that why can't you do about the same mutexed
>> activated inside static_key API function instead of requiring every
>> user to worry about the function returning asynchronously.
>> ie. synchronize inside static_key API instead of in the callers.
>>
>
> Like this?
Yeah, something like that. If keeping the inc operation a single
atomic op is important for performance or whatever reasons, you can
play some trick with large negative bias value while activation is
going on and use atomic_add_return() to determine both whether it's
the first incrementer and someone else is in the process of
activating.
Thanks.
--
tejun
--
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