All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Low <jason.low2@hp.com>
To: George Spelvin <linux@horizon.com>
Cc: linux-kernel@vger.kernel.org, jason.low2@hp.com
Subject: Re: [PATCH 3/3] timer: Reduce unnecessary sighand lock contention
Date: Thu, 27 Aug 2015 14:55:55 -0700	[thread overview]
Message-ID: <1440712555.32300.112.camel@j-VirtualBox> (raw)
In-Reply-To: <20150827012828.9471.qmail@ns.horizon.com>

On Wed, 2015-08-26 at 21:28 -0400, George Spelvin wrote:
> > I can include your patch in the series and then use boolean for the new
> > checking_timer field. However, it looks like this applies on an old
> > kernel. For example, the spin_lock field has already been removed from
> > the structure.
> 
> Apologies; that was 4.1.6.  A 4.2-rc8 patch is appended (it's a pretty
> trivial merge once you look at it).

Frederic suggested that we just use a single "status" variable and
access the bits for the running and checking field. I am leaning towards
that method, so I might not include the rest of the boolean changes in
this patchset.

> > The spinlock call has already been removed from a previous patch. The
> > issue now is with contention with the sighand lock.
> 
> I'll look some more and try to wrap my head around it.
> 
> >> Or is it basically okay if this is massively racey, since process-wide
> >> CPU timers are inherently sloppy.  A race will just cause an expiration
> >> check to be missed, but it will be retried soon anyway.
> 
> > Yes, the worst case scenario is that we wait until the next thread to
> > come along and handle the next expired timer. However, this "delay"
> > already occurs now (for example: a timer can expire right after a thread
> > exits check_process_timers()).
> 
> Ad is this polled, or is there some non-polled system that will trigger
> another call to check_process_timers().
> 
> E.g. suppose a process fails to notice that it blew past a CPU time
> timeout before blocking.  Does anything guarantee that it will get
> the timeout signal in finite real time?

Yep, the check_process_timers will get called again during the next
scheduler interrupt (approximately after 1 jiffy) and send the signal if
it finds that the timer expired then.


  reply	other threads:[~2015-08-27 21:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-26 19:33 [PATCH 3/3] timer: Reduce unnecessary sighand lock contention George Spelvin
2015-08-26 23:44 ` Jason Low
2015-08-27  1:28   ` George Spelvin
2015-08-27 21:55     ` Jason Low [this message]
2015-08-27 22:43       ` George Spelvin
2015-08-28  4:32         ` Jason Low
  -- strict thread matches above, loose matches on Subject: below --
2015-08-26 21:05 George Spelvin
2015-08-26  3:17 [PATCH 0/3] timer: Improve itimers scalability Jason Low
2015-08-26  3:17 ` [PATCH 3/3] timer: Reduce unnecessary sighand lock contention Jason Low
2015-08-26 17:53   ` Linus Torvalds
2015-08-26 22:31     ` Frederic Weisbecker
2015-08-26 22:57       ` Jason Low
2015-08-26 22:56   ` Frederic Weisbecker
2015-08-26 23:32     ` Jason Low
2015-08-27  4:52       ` Jason Low
2015-08-27 12:53       ` Frederic Weisbecker
2015-08-27 20:29         ` Jason Low
2015-08-27 21:12           ` Frederic Weisbecker

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=1440712555.32300.112.camel@j-VirtualBox \
    --to=jason.low2@hp.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.