public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Frederic Weisbecker <frederic@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	LKML <linux-kernel@vger.kernel.org>,
	"Eric W . Biederman" <ebiederm@xmission.com>,
	Oleg Nesterov <oleg@redhat.com>, Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH 7/7] posix-cpu-timers: Recalc next expiration when timer_settime() ends up not queueing
Date: Mon, 28 Jun 2021 17:57:35 +0200	[thread overview]
Message-ID: <YNnxbzgckC3+Rh+7@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20210622234155.119685-8-frederic@kernel.org>

On Wed, Jun 23, 2021 at 01:41:55AM +0200, Frederic Weisbecker wrote:
>  include/linux/posix-timers.h   |  7 +++++-
>  kernel/time/posix-cpu-timers.c | 41 +++++++++++++++++++++++++++++-----
>  2 files changed, 41 insertions(+), 7 deletions(-)
> 
> diff --git a/include/linux/posix-timers.h b/include/linux/posix-timers.h
> index 4cf1fbe8d1bc..00fef0064355 100644
> --- a/include/linux/posix-timers.h
> +++ b/include/linux/posix-timers.h
> @@ -82,9 +82,14 @@ static inline bool cpu_timer_enqueue(struct timerqueue_head *head,
>  	return timerqueue_add(head, &ctmr->node);
>  }
>  
> +static inline bool cpu_timer_queued(struct cpu_timer *ctmr)
> +{
> +	return !!ctmr->head;

Sad that we can't check sighand lock here... but I agree that adding
that will be messy :/

> +}

  reply	other threads:[~2021-06-28 15:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-22 23:41 [PATCH 0/7] posix-cpu-timers: Bunch of fixes v2 Frederic Weisbecker
2021-06-22 23:41 ` [PATCH 1/7] posix-cpu-timers: Fix rearm racing against process tick Frederic Weisbecker
2021-06-22 23:41 ` [PATCH 2/7] posix-cpu-timers: Assert task sighand is locked while starting cputime counter Frederic Weisbecker
2021-06-23 11:15   ` Frederic Weisbecker
2021-06-22 23:41 ` [PATCH 3/7] posix-cpu-timers: Force next_expiration recalc after timer deletion Frederic Weisbecker
2021-06-22 23:41 ` [PATCH 4/7] posix-cpu-timers: Force next expiration recalc after itimer reset Frederic Weisbecker
2021-06-22 23:41 ` [PATCH 5/7] posix-cpu-timers: Remove confusing error code override Frederic Weisbecker
2021-06-22 23:41 ` [PATCH 6/7] posix-cpu-timers: Consolidate timer base accessor Frederic Weisbecker
2021-06-22 23:41 ` [PATCH 7/7] posix-cpu-timers: Recalc next expiration when timer_settime() ends up not queueing Frederic Weisbecker
2021-06-28 15:57   ` Peter Zijlstra [this message]
2021-06-28 15:58 ` [PATCH 0/7] posix-cpu-timers: Bunch of fixes v2 Peter Zijlstra

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=YNnxbzgckC3+Rh+7@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=ebiederm@xmission.com \
    --cc=frederic@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=tglx@linutronix.de \
    /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