Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1358164

Re: [PATCH] nohz: Change tick_dep_mask from 'unsigned long' to 'unsigned int'

From Frederic Weisbecker <fweisbec@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] nohz: Change tick_dep_mask from 'unsigned long' to 'unsigned int'
Date 2016-03-15 18:30 +0100
Message-ID <rd0X8-566-13@gated-at.bofh.it> (permalink)
References <rczWV-3JY-15@gated-at.bofh.it> <rcNdw-49L-5@gated-at.bofh.it> <rcTVD-ip-1@gated-at.bofh.it> <rcW78-1Xi-11@gated-at.bofh.it> <rd0aK-4xG-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Mar 15, 2016 at 09:30:49AM -0700, Linus Torvalds wrote:
> On Tue, Mar 15, 2016 at 5:15 AM, Ingo Molnar <mingo@kernel.org> wrote:
> >
> > Hm, so the problem I did not consider is the following:
> >
> >  triton:~/tip> git grep tick_dep_mask kernel | grep _bit
> >  kernel/time/tick-sched.c:       clear_bit(bit, &ts->tick_dep_mask);
> >  kernel/time/tick-sched.c:       clear_bit(bit, &tsk->tick_dep_mask);
> >  kernel/time/tick-sched.c:       clear_bit(bit, &sig->tick_dep_mask);

Ah! Now I remember why I used unsigned long :-s

> 
> Ahh. I missed that too.
> 
> Ok, leave the 64-bit field for now, while we think about this. But one
> option is to just use "atomic_andnot()" instead of clear_bit().
> 
> That would imply using an "atomic_t", which would be fairly natural
> (and would be 32-bit).

I can try that. And then we would end up with atomic_fetch_or() and maybe
the scheduler could keep its ad-hoc version until thread_info types get unified
(if that's possible).

> 
> And wouldn't it be so nice if "thread_info->flags" would just be
> atomic_t too. Right now we use a mixture of bit-ops and ACCESS_ONCE()
> (and many codepaths then doing neither, and just accessing it
> directly, ignoring any races.
> 
> Oh well.

I can try that too while at it :-)

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[GIT PULL] NOHZ updates for v4.6 Ingo Molnar <mingo@kernel.org> - 2016-03-14 13:40 +0100
  Re: [GIT PULL] NOHZ updates for v4.6 Linus Torvalds <torvalds@linux-foundation.org> - 2016-03-15 03:50 +0100
    Re: [GIT PULL] NOHZ updates for v4.6 Peter Zijlstra <peterz@infradead.org> - 2016-03-15 09:50 +0100
      Re: [GIT PULL] NOHZ updates for v4.6 Ingo Molnar <mingo@kernel.org> - 2016-03-15 10:50 +0100
    [PATCH] atomic: Fix bugs in 'fetch_or()' and rename it to 'xchg_or()' Ingo Molnar <mingo@kernel.org> - 2016-03-15 10:40 +0100
      Re: [PATCH] atomic: Fix bugs in 'fetch_or()' and rename it to  'xchg_or()' Peter Zijlstra <peterz@infradead.org> - 2016-03-15 12:00 +0100
        Re: [PATCH] atomic: Fix bugs in 'fetch_or()' and rename it to  'xchg_or()' Ingo Molnar <mingo@kernel.org> - 2016-03-15 13:10 +0100
          Re: [PATCH] atomic: Fix bugs in 'fetch_or()' and rename it to  'xchg_or()' Peter Zijlstra <peterz@infradead.org> - 2016-03-15 13:50 +0100
      Re: [PATCH] atomic: Fix bugs in 'fetch_or()' and rename it to  'xchg_or()' Peter Zijlstra <peterz@infradead.org> - 2016-03-15 12:10 +0100
      Re: [PATCH] atomic: Fix bugs in 'fetch_or()' and rename it to  'xchg_or()' Ingo Molnar <mingo@kernel.org> - 2016-03-15 13:10 +0100
        Re: [PATCH] atomic: Fix bugs in 'fetch_or()' and rename it to  'xchg_or()' Ingo Molnar <mingo@kernel.org> - 2016-03-15 13:40 +0100
          Re: [PATCH] atomic: Fix bugs in 'fetch_or()' and rename it to  'xchg_or()' Ingo Molnar <mingo@kernel.org> - 2016-03-15 13:40 +0100
          Re: [PATCH] atomic: Fix bugs in 'fetch_or()' and rename it to  'xchg_or()' Peter Zijlstra <peterz@infradead.org> - 2016-03-15 14:20 +0100
      Re: [PATCH] atomic: Fix bugs in 'fetch_or()' and rename it to  'xchg_or()' Peter Zijlstra <peterz@infradead.org> - 2016-03-15 13:30 +0100
      [PATCH v2] atomic: Fix bugs in 'fetch_or()' and rename it to  'xchg_or()' Ingo Molnar <mingo@kernel.org> - 2016-03-15 13:30 +0100
        Re: [PATCH v2] atomic: Fix bugs in 'fetch_or()' and rename it to  'xchg_or()' Peter Zijlstra <peterz@infradead.org> - 2016-03-15 14:30 +0100
          Re: [PATCH v2] atomic: Fix bugs in 'fetch_or()' and rename it to  'xchg_or()' Ingo Molnar <mingo@kernel.org> - 2016-03-16 09:10 +0100
            Re: [PATCH v2] atomic: Fix bugs in 'fetch_or()' and rename it to  'xchg_or()' Peter Zijlstra <peterz@infradead.org> - 2016-03-16 09:40 +0100
        Re: [PATCH v2] atomic: Fix bugs in 'fetch_or()' and rename it to  'xchg_or()' Frederic Weisbecker <fweisbec@gmail.com> - 2016-03-15 18:10 +0100
          Re: [PATCH v2] atomic: Fix bugs in 'fetch_or()' and rename it to  'xchg_or()' Ingo Molnar <mingo@kernel.org> - 2016-03-16 09:20 +0100
            Re: [PATCH v2] atomic: Fix bugs in 'fetch_or()' and rename it to  'xchg_or()' Frederic Weisbecker <fweisbec@gmail.com> - 2016-03-17 02:00 +0100
      Re: [PATCH] atomic: Fix bugs in 'fetch_or()' and rename it to 'xchg_or()' Linus Torvalds <torvalds@linux-foundation.org> - 2016-03-15 17:20 +0100
    [PATCH] nohz: Change tick_dep_mask from 'unsigned long' to 'unsigned  int' Ingo Molnar <mingo@kernel.org> - 2016-03-15 11:00 +0100
      Re: [PATCH] nohz: Change tick_dep_mask from 'unsigned long' to  'unsigned int' Ingo Molnar <mingo@kernel.org> - 2016-03-15 13:20 +0100
        Re: [PATCH] nohz: Change tick_dep_mask from 'unsigned long' to  'unsigned int' Linus Torvalds <torvalds@linux-foundation.org> - 2016-03-15 17:40 +0100
          Re: [PATCH] nohz: Change tick_dep_mask from 'unsigned long' to  'unsigned int' Frederic Weisbecker <fweisbec@gmail.com> - 2016-03-15 18:30 +0100
            Re: [PATCH] nohz: Change tick_dep_mask from 'unsigned long' to  'unsigned int' Linus Torvalds <torvalds@linux-foundation.org> - 2016-03-15 18:40 +0100

csiph-web