On Wednesday 28 November 2007, Pavel Machek wrote:There were some patches from Mark Lord to update the wildcarding, and to hibernation to work better with ACPI. I still don't think the wildcarding is done quite right; there are some date-wrap cases that looked wrong. It's not an issue of accidental writes, it's an issue of there being no other synchronization for setting those alarms. Remember that both RTC_WKALM_SET and RTC_ALM_SET ioctls can set that same alarm, and so could a different userspace activity ... If there's no alarm set, it's clear that changing the (single) alarm can't cause event lossage. But if an alarm *is* set it sure seems that changing it would discard an event that something was expecting, and thus cause breakage. As written, this allows one userspace activity to clobber another if it does so explicitly, by first disabling the other one and then setting its own alarm. But the idea is to minimize "accidents" like unintentionally clobbering an alarm set by someone else. Evidently the alarm isn't being disabled then... I think the issue there is that the alarm isn't acting as a one-shot event. There are some model questions lurking there ... if the RTC has a sane alarm model, "fire at YYYY-MM-DD at HH:MM:SS", then it's naturally one-shot. But if the YYYY-MM-DD part is a wildcard (or equivalently, ignored) at the hardware level, that model is awkward. You can't easily look at such alarms and know if they already triggered -- especially after hibernation. With respect to rtc-cmos, it'd always be practical to disable the alarm after it triggers while the system is running. (Not currently done, pending resolution of such issues.) And there's an ACPI flag -- currently ignored by Linux, or maybe trashed -- to report whether the system wakeup was triggered by an alarm; that could be read, and used to disable the alarm. I think the right thing to do there is just insist that in the RTC framework, alarms should always follow the one-shot model. - Dave -
| Ingo Molnar | [patch 12/13] syslets: x86: optimized copy_uatom() |
| Greg Kroah-Hartman | [PATCH 017/196] aoechr: Convert from class_device to device |
| Yinghai Lu | Re: 2.6.26, PAT and AMD family 6 |
| Jan Engelhardt | intel iommu (Re: -mm merge plans for 2.6.23) |
git: | |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | [GIT]: Networking |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Natalie Protasevich | [BUG] New Kernel Bugs |
