From: Frank Mayhar <fmayhar@google.com>
To: Roland McGrath <roland@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: posix-cpu-timers revamp
Date: Fri, 21 Mar 2008 13:40:00 -0700 [thread overview]
Message-ID: <1206132000.14638.42.camel@bobble.smo.corp.google.com> (raw)
In-Reply-To: <20080321071846.1B22B26F9A7@magilla.localdomain>
On Fri, 2008-03-21 at 00:18 -0700, Roland McGrath wrote:
> I think I misled you about the use of the it_*_expires fields, sorry.
> The task_struct.it_*_expires fields are used solely as a cache of the
> head of cpu_timers[]. Despite the poor choice of the same name, the
> signal_struct.it_*_expires fields serve a different purpose. For an
> analogous cache of the soonest timer to expire, you need to add new
> fields. The signal_struct.it_{prof,virt}_{expires,incr} fields hold
> the setitimer settings for ITIMER_{PROF,VTALRM}. You can't change
> those in arm_timer. For a quick cache you need a new field that is
> the sooner of it_foo_expires or the head cpu_timers[foo] expiry time.
Actually, after looking at the code again and thinking about it a bit,
it appears that the signal_struct.it_*_incr field holds the actual
interval as set by setitimer. Initially the it_*_expires field holds
the expiration time as set by setitimer, but after the timer fires the
first time that value becomes <firing time>+it_*_incr. In other words,
the first time it fires at the value set by setitimer() but from then on
it fires at a time indicated by whatever the time was the last time the
timer fired plus the value in it_*_incr. This time is stored in
signal_struct.it_*_expires.
I guess I could be wrong about this, but it appears to be what the code
is doing. If my analysis is correct, I really don't need a new field,
since the old fields work just fine.
--
Frank Mayhar <fmayhar@google.com>
Google, Inc.
next prev parent reply other threads:[~2008-03-21 20:40 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-9906-10286@http.bugzilla.kernel.org/>
2008-02-07 0:50 ` [Bugme-new] [Bug 9906] New: Weird hang with NPTL and SIGPROF Andrew Morton
2008-02-07 0:58 ` Frank Mayhar
2008-02-07 2:57 ` Parag Warudkar
2008-02-07 15:22 ` Alejandro Riveira Fernández
2008-02-07 15:53 ` Parag Warudkar
2008-02-07 15:56 ` Parag Warudkar
2008-02-07 15:54 ` Alejandro Riveira Fernández
2008-02-07 16:01 ` Parag Warudkar
2008-02-07 16:53 ` Parag Warudkar
2008-02-29 19:55 ` Frank Mayhar
2008-03-04 7:00 ` Roland McGrath
2008-03-04 19:52 ` Frank Mayhar
2008-03-05 4:08 ` Roland McGrath
2008-03-06 19:04 ` Frank Mayhar
2008-03-11 7:50 ` posix-cpu-timers revamp Roland McGrath
2008-03-11 21:05 ` Frank Mayhar
2008-03-11 21:35 ` Roland McGrath
2008-03-14 0:37 ` Frank Mayhar
2008-03-21 7:18 ` Roland McGrath
2008-03-21 17:57 ` Frank Mayhar
2008-03-22 21:58 ` Roland McGrath
2008-03-24 17:34 ` Frank Mayhar
2008-03-24 22:43 ` Frank Mayhar
2008-03-31 5:44 ` Roland McGrath
2008-03-31 20:24 ` Frank Mayhar
2008-04-02 2:07 ` Roland McGrath
2008-04-02 16:34 ` Frank Mayhar
2008-04-02 17:42 ` Frank Mayhar
2008-04-02 19:48 ` Roland McGrath
2008-04-02 20:34 ` Frank Mayhar
2008-04-02 21:42 ` Frank Mayhar
2008-04-04 0:53 ` Frank Mayhar
2008-04-04 23:17 ` Roland McGrath
2008-04-06 5:26 ` Frank Mayhar
2008-04-07 20:08 ` Roland McGrath
2008-04-07 21:31 ` Frank Mayhar
2008-04-07 22:02 ` Roland McGrath
2008-04-08 21:27 ` Frank Mayhar
2008-04-08 21:52 ` Frank Mayhar
2008-04-08 22:49 ` Roland McGrath
2008-04-09 16:29 ` Frank Mayhar
2008-04-02 18:42 ` Frank Mayhar
2008-03-28 0:52 ` [PATCH 2.6.25-rc6] Fix itimer/many thread hang Frank Mayhar
2008-03-28 10:28 ` Ingo Molnar
2008-03-28 22:46 ` [PATCH 2.6.25-rc7 resubmit] " Frank Mayhar
2008-04-01 18:45 ` Andrew Morton
2008-04-01 21:46 ` Frank Mayhar
2008-03-21 20:40 ` Frank Mayhar [this message]
2008-03-07 23:26 ` [Bugme-new] [Bug 9906] New: Weird hang with NPTL and SIGPROF Frank Mayhar
2008-03-08 0:01 ` Frank Mayhar
2008-02-07 17:36 ` Frank Mayhar
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=1206132000.14638.42.camel@bobble.smo.corp.google.com \
--to=fmayhar@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=roland@redhat.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