public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Low <jason.low2@hp.com>
To: George Spelvin <linux@horizon.com>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	jason.low2@hp.com
Subject: Re: [PATCH 2/3] timer: Check thread timers only when there are active thread timers
Date: Wed, 26 Aug 2015 10:41:16 -0700	[thread overview]
Message-ID: <1440610876.23728.101.camel@j-VirtualBox> (raw)
In-Reply-To: <20150826170439.4724.qmail@ns.horizon.com>

On Wed, 2015-08-26 at 13:04 -0400, George Spelvin wrote:
> -	check_thread_timers(tsk, &firing);
> +	if (!task_cputime_zero(&tsk->cputime_expires))
> +		check_thread_timers(tsk, &firing);
> 
> Sincere question; I'm not certain myself: would it make more sense to put
> this shortcut into check_thread_timers()?
> 
> It seems more like an optimization of that function than something the
> caller needs to know about.

Yes, I also thought it might be better if we add something like:

	if (task_cputime_zero(&tsk->cputime_expires)
		return;

in check_thread_timers(). The reason I made it this way though is
because in the next few lines, we do a similar check before calling
check_process_timers(), and I wanted to keep things consistent.

However, perhaps we can consider also moving that
tsk->signal->cputimer.running check into check_process_timers() too.

Thanks for the suggestions.


  reply	other threads:[~2015-08-26 17:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-26 17:04 [PATCH 2/3] timer: Check thread timers only when there are active thread timers George Spelvin
2015-08-26 17:41 ` Jason Low [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-08-26  3:17 [PATCH 0/3] timer: Improve itimers scalability Jason Low
2015-08-26  3:17 ` [PATCH 2/3] timer: Check thread timers only when there are active thread timers Jason Low

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=1440610876.23728.101.camel@j-VirtualBox \
    --to=jason.low2@hp.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@horizon.com \
    /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