Re: posix-cpu-timers revamp
- From: Frank Mayhar <fmayhar@xxxxxxxxxx>
- Date: Fri, 21 Mar 2008 13:40:00 -0700
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@xxxxxxxxxx>
Google, Inc.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- References:
- Re: [Bugme-new] [Bug 9906] New: Weird hang with NPTL and SIGPROF.
- From: Roland McGrath
- Re: [Bugme-new] [Bug 9906] New: Weird hang with NPTL and SIGPROF.
- From: Frank Mayhar
- Re: [Bugme-new] [Bug 9906] New: Weird hang with NPTL and SIGPROF.
- From: Roland McGrath
- Re: [Bugme-new] [Bug 9906] New: Weird hang with NPTL and SIGPROF.
- From: Frank Mayhar
- posix-cpu-timers revamp
- From: Roland McGrath
- Re: posix-cpu-timers revamp
- From: Frank Mayhar
- Re: posix-cpu-timers revamp
- From: Roland McGrath
- Re: posix-cpu-timers revamp
- From: Frank Mayhar
- Re: posix-cpu-timers revamp
- From: Roland McGrath
- Re: [Bugme-new] [Bug 9906] New: Weird hang with NPTL and SIGPROF.
- Prev by Date: Re: [SCSI] fix media change events for polled devices
- Next by Date: Re: [PATCH] x86: relocate_kernel - use predefined PAGE_SIZE instead of own alias
- Previous by thread: [PATCH 2.6.25-rc7 resubmit] Fix itimer/many thread hang.
- Next by thread: Re: [Bugme-new] [Bug 9906] New: Weird hang with NPTL and SIGPROF.
- Index(es):
Relevant Pages
|