> > > Isn't that what we have static_key_enable() for? Which btw also uses
> > > static_key_count() outside of the mutex.
> >
> > Yes, they should be fixed and net/ can then use static_key_enable.
>
> Right, let me try and fix _enable().
Here is what I scribbled before leaving the office.
> > > Isn't that what we have static_key_enable() for? Which btw also uses
> > > static_key_count() outside of the mutex.
> >
> > Yes, they should be fixed and net/ can then use static_key_enable.
>
> Right, let me try and fix _enable().
Here is what I scribbled before leaving the office.
On Mon, Jul 31, 2017 at 6:33 AM, Peter Zijlstra wrote:
> On Mon, Jul 31, 2017 at 03:04:06PM +0200, Paolo Bonzini wrote:
>> - key->enabled cannot go from 0 to nonzero outside jump_label_mutex.
>> For this reason the atomic_try_cmpxchg is unnecessary.
>
> Agreed, the only
On Mon, Jul 31, 2017 at 6:33 AM, Peter Zijlstra wrote:
> On Mon, Jul 31, 2017 at 03:04:06PM +0200, Paolo Bonzini wrote:
>> - key->enabled cannot go from 0 to nonzero outside jump_label_mutex.
>> For this reason the atomic_try_cmpxchg is unnecessary.
>
> Agreed, the only reason was the implied
On Mon, Jul 31, 2017 at 05:35:40PM +0200, Paolo Bonzini wrote:
> On 31/07/2017 15:33, Peter Zijlstra wrote:
> > On Mon, Jul 31, 2017 at 03:04:06PM +0200, Paolo Bonzini wrote:
> >> - the smp_mb (though it could be a smp_wmb or atomic_set_release)
> >> initially triggered my paranoia indeed. But
On Mon, Jul 31, 2017 at 05:35:40PM +0200, Paolo Bonzini wrote:
> On 31/07/2017 15:33, Peter Zijlstra wrote:
> > On Mon, Jul 31, 2017 at 03:04:06PM +0200, Paolo Bonzini wrote:
> >> - the smp_mb (though it could be a smp_wmb or atomic_set_release)
> >> initially triggered my paranoia indeed. But
On 31/07/2017 15:33, Peter Zijlstra wrote:
> On Mon, Jul 31, 2017 at 03:04:06PM +0200, Paolo Bonzini wrote:
>> - the smp_mb (though it could be a smp_wmb or atomic_set_release)
>> initially triggered my paranoia indeed. But even then, I can't see why
>> you would need it because there's nothing
On 31/07/2017 15:33, Peter Zijlstra wrote:
> On Mon, Jul 31, 2017 at 03:04:06PM +0200, Paolo Bonzini wrote:
>> - the smp_mb (though it could be a smp_wmb or atomic_set_release)
>> initially triggered my paranoia indeed. But even then, I can't see why
>> you would need it because there's nothing
On Mon, Jul 31, 2017 at 03:04:06PM +0200, Paolo Bonzini wrote:
> - key->enabled cannot go from 0 to nonzero outside jump_label_mutex.
> For this reason the atomic_try_cmpxchg is unnecessary.
Agreed, the only reason was the implied barrier.
> - the (implied) smp_mb before jump_label_update is not
On Mon, Jul 31, 2017 at 03:04:06PM +0200, Paolo Bonzini wrote:
> - key->enabled cannot go from 0 to nonzero outside jump_label_mutex.
> For this reason the atomic_try_cmpxchg is unnecessary.
Agreed, the only reason was the implied barrier.
> - the (implied) smp_mb before jump_label_update is not
On 31/07/2017 11:36, Peter Zijlstra wrote:
> On Fri, Jun 24, 2016 at 01:59:06AM -0700, tip-bot for Paolo Bonzini wrote:
>> +++ b/kernel/jump_label.c
>> @@ -58,13 +58,36 @@ static void jump_label_update(struct static_key *key);
>>
>> void static_key_slow_inc(struct static_key *key)
>> {
>> +
On 31/07/2017 11:36, Peter Zijlstra wrote:
> On Fri, Jun 24, 2016 at 01:59:06AM -0700, tip-bot for Paolo Bonzini wrote:
>> +++ b/kernel/jump_label.c
>> @@ -58,13 +58,36 @@ static void jump_label_update(struct static_key *key);
>>
>> void static_key_slow_inc(struct static_key *key)
>> {
>> +
On Fri, Jun 24, 2016 at 01:59:06AM -0700, tip-bot for Paolo Bonzini wrote:
> +++ b/kernel/jump_label.c
> @@ -58,13 +58,36 @@ static void jump_label_update(struct static_key *key);
>
> void static_key_slow_inc(struct static_key *key)
> {
> + int v, v1;
> +
> STATIC_KEY_CHECK_USE();
>
On Fri, Jun 24, 2016 at 01:59:06AM -0700, tip-bot for Paolo Bonzini wrote:
> +++ b/kernel/jump_label.c
> @@ -58,13 +58,36 @@ static void jump_label_update(struct static_key *key);
>
> void static_key_slow_inc(struct static_key *key)
> {
> + int v, v1;
> +
> STATIC_KEY_CHECK_USE();
>
Commit-ID: 4c5ea0a9cd02d6aa8adc86e100b2a4cff8d614ff
Gitweb: http://git.kernel.org/tip/4c5ea0a9cd02d6aa8adc86e100b2a4cff8d614ff
Author: Paolo Bonzini
AuthorDate: Tue, 21 Jun 2016 18:52:17 +0200
Committer: Ingo Molnar
CommitDate: Fri, 24 Jun 2016
Commit-ID: 4c5ea0a9cd02d6aa8adc86e100b2a4cff8d614ff
Gitweb: http://git.kernel.org/tip/4c5ea0a9cd02d6aa8adc86e100b2a4cff8d614ff
Author: Paolo Bonzini
AuthorDate: Tue, 21 Jun 2016 18:52:17 +0200
Committer: Ingo Molnar
CommitDate: Fri, 24 Jun 2016 08:23:16 +0200
locking/static_key: Fix
16 matches
Mail list logo