From: Thomas Gleixner <tglx@linutronix.de>
To: David Laight <David.Laight@ACULAB.COM>,
Frederic Weisbecker <frederic@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
"x86\@kernel.org" <x86@kernel.org>,
Oleg Nesterov <oleg@redhat.com>,
"Eric W. Biederman" <ebiederm@xmission.com>,
John Stultz <john.stultz@linaro.org>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: RE: [patch V2 2/5] posix-cpu-timers: Convert the flags to a bitmap
Date: Tue, 21 Jul 2020 20:30:02 +0200 [thread overview]
Message-ID: <871rl44t79.fsf@nanos.tec.linutronix.de> (raw)
In-Reply-To: <d9bb2c5f6df1471f8863f84e710e50a4@AcuMS.aculab.com>
David Laight <David.Laight@ACULAB.COM> writes:
> From: Thomas Gleixner
>> Sent: 21 July 2020 17:11
>>
>> Frederic Weisbecker <frederic@kernel.org> writes:
>> > On Thu, Jul 16, 2020 at 10:19:25PM +0200, Thomas Gleixner wrote:
>> >> --- a/kernel/time/posix-cpu-timers.c
>> >> +++ b/kernel/time/posix-cpu-timers.c
>> >> @@ -25,7 +25,7 @@ void posix_cputimers_group_init(struct p
>> >> posix_cputimers_init(pct);
>> >> if (cpu_limit != RLIM_INFINITY) {
>> >> pct->bases[CPUCLOCK_PROF].nextevt = cpu_limit * NSEC_PER_SEC;
>> >> - pct->timers_active = true;
>> >> + set_bit(CPUTIMERS_ACTIVE, &pct->flags);
>> >
>> > I guess this one could be __set_bit().
>>
>> True :)
>
> Hmmm... does this code need the bit operations to be atmomic?
> If not then an bitmap is completely the wrong thing to be using.
Some of it does, otherwise the booleans would have stayed, but I'm
reworking parts of it so this might change.
Thanks,
tglx
next prev parent reply other threads:[~2020-07-21 18:30 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-16 20:19 [patch V2 0/5] posix-cpu-timers: Move expiry into task work context Thomas Gleixner
2020-07-16 20:19 ` [patch V2 1/5] posix-cpu-timers: Split run_posix_cpu_timers() Thomas Gleixner
2020-07-16 20:19 ` [patch V2 2/5] posix-cpu-timers: Convert the flags to a bitmap Thomas Gleixner
2020-07-21 12:34 ` Frederic Weisbecker
2020-07-21 16:10 ` Thomas Gleixner
2020-07-21 16:23 ` David Laight
2020-07-21 18:30 ` Thomas Gleixner [this message]
2020-07-16 20:19 ` [patch V2 3/5] posix-cpu-timers: Provide mechanisms to defer timer handling to task_work Thomas Gleixner
2020-07-16 22:50 ` Peter Zijlstra
2020-07-17 18:37 ` Thomas Gleixner
2020-07-23 1:03 ` Frederic Weisbecker
2020-07-23 8:32 ` Thomas Gleixner
2020-07-23 12:15 ` Frederic Weisbecker
2020-07-16 22:54 ` Peter Zijlstra
2020-07-17 18:38 ` Thomas Gleixner
2020-07-19 19:33 ` Thomas Gleixner
2020-07-21 18:50 ` Thomas Gleixner
2020-07-17 17:26 ` Oleg Nesterov
2020-07-17 18:35 ` Thomas Gleixner
2020-07-16 20:19 ` [patch V2 4/5] posix-cpu-timers: Expiry timers directly when in task work context Thomas Gleixner
2020-07-16 20:19 ` [patch V2 5/5] x86: Select POSIX_CPU_TIMERS_TASK_WORK Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871rl44t79.fsf@nanos.tec.linutronix.de \
--to=tglx@linutronix.de \
--cc=David.Laight@ACULAB.COM \
--cc=ebiederm@xmission.com \
--cc=frederic@kernel.org \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=pbonzini@redhat.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox