From: Peter Hilber <peter.hilber@opensynergy.com>
To: Cornelia Huck <cohuck@redhat.com>, virtio-comment@lists.oasis-open.org
Cc: Parav Pandit <parav@nvidia.com>, Jason Wang <jasowang@redhat.com>
Subject: Re: [virtio-comment] [RFC PATCH v3 3/4] virtio-rtc: Add alarm feature
Date: Thu, 11 Jan 2024 12:43:23 +0100 [thread overview]
Message-ID: <a284ed4f-9ca1-4b8a-8c79-beec5040bd6b@opensynergy.com> (raw)
In-Reply-To: <87wmt63w1l.fsf@redhat.com>
On 22.12.23 19:57, Cornelia Huck wrote:
> On Mon, Dec 18 2023, Peter Hilber <peter.hilber@opensynergy.com> wrote:
>
>> Add the VIRTIO_RTC_F_ALARM feature (without normative statements).
>>
>> The intended use case is: A driver needs to react when an alarm time has
>> been reached, but the driver may be in a sleep state or powered off at
>> alarm time. The alarm feature can resume and notify the driver in this
>> case. Alarms may be retained across device resets (including reset on
>> boot).
>
> Does the driver have some kind of control or information about whether
> alarms are retained? I.e. to start with a clean slate, if wanted.
As of now, the driver can disable the alarm through
VIRTIO_RTC_REQ_SET_ALARM_ENABLED. If the driver does this before making
buffers available to the alarmq, the device behaves like starting with a
clean slate, with two exceptions:
- VIRTIO_RTC_REQ_READ_ALARM might return a different alarm time than the
one at the first reset (but the alarm would be disabled).
If adding the minimum allowed alarm time to the spec, as was discussed in
the "Open Questions" section of the patch, initializing to the minimum
allowed alarm time could also become part of the "clean slate", so that
this exception would be removed.
- The requirements currently allow a "grace period" after disabling through
VIRTIO_RTC_REQ_SET_ALARM_ENABLED, during which the device could still
give the alarm notification, or execute custom alarm actions.
The draft spec permits alarm actions to continue for a short time after
the alarm has become obsolete, in order to not unnecessarily restrict
implementations. While I would not consider a sporadic-looking alarm
notification (which the driver can easily recognize as such) to be a
problem, the spec does not require to immediately cancel an obsolete
custom alarm action either.
But the requirements could be tightened so that all the actions have to
be completed or canceled before the device marks
VIRTIO_RTC_REQ_SET_ALARM_ENABLED as used:
If the driver successfully requests VIRTIO_RTC_REQ_SET_ALARM, or
VIRTIO_RTC_REQ_SET_ALARM_ENABLED, for clock C, the device MUST stop
serving any previous alarm expiration event for C before the device
marks the message as used.
This would remove the second exception.
I think I will just do the two above changes, if nobody objects.
Thanks for the comment,
Peter
This publicly archived list offers a means to provide input to the
OASIS Virtual I/O Device (VIRTIO) TC.
In order to verify user consent to the Feedback License terms and
to minimize spam in the list archive, subscription is required
before posting.
Subscribe: virtio-comment-subscribe@lists.oasis-open.org
Unsubscribe: virtio-comment-unsubscribe@lists.oasis-open.org
List help: virtio-comment-help@lists.oasis-open.org
List archive: https://lists.oasis-open.org/archives/virtio-comment/
Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.pdf
List Guidelines: https://www.oasis-open.org/policies-guidelines/mailing-lists
Committee: https://www.oasis-open.org/committees/virtio/
Join OASIS: https://www.oasis-open.org/join/
next prev parent reply other threads:[~2024-01-11 11:43 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-18 6:42 [virtio-comment] [RFC PATCH v3 0/4] virtio-rtc: Add device specification Peter Hilber
2023-12-18 6:42 ` [virtio-comment] [RFC PATCH v3 1/4] virtio-rtc: Add initial " Peter Hilber
2024-01-20 10:07 ` [virtio-comment] " Parav Pandit
2024-01-24 15:39 ` [virtio-comment] " Peter Hilber
2024-01-28 6:15 ` [virtio-comment] " Parav Pandit
2024-02-08 11:57 ` Peter Hilber
2024-02-09 11:43 ` Cornelia Huck
2023-12-18 6:42 ` [virtio-comment] [RFC PATCH v3 2/4] virtio-rtc: Add initial normative statements Peter Hilber
2023-12-18 6:42 ` [virtio-comment] [RFC PATCH v3 3/4] virtio-rtc: Add alarm feature Peter Hilber
2023-12-22 18:57 ` Cornelia Huck
2023-12-25 4:18 ` Jason Wang
2024-01-11 11:43 ` Peter Hilber
2024-01-11 11:43 ` Peter Hilber [this message]
2024-01-15 15:54 ` Cornelia Huck
2024-01-16 11:06 ` Peter Hilber
2024-01-20 10:16 ` [virtio-comment] " Parav Pandit
2024-01-24 15:40 ` [virtio-comment] " Peter Hilber
2024-01-28 6:30 ` [virtio-comment] " Parav Pandit
2024-01-29 16:51 ` Cornelia Huck
2024-02-01 5:53 ` Parav Pandit
2023-12-18 6:42 ` [virtio-comment] [RFC PATCH v3 4/4] virtio-rtc: Add normative statements for " Peter Hilber
2024-07-25 4:53 ` [virtio-comment] [RFC PATCH v3 0/4] virtio-rtc: Add device specification Michael S. Tsirkin
2024-07-25 8:32 ` David Woodhouse
2024-08-09 12:53 ` Peter Hilber
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=a284ed4f-9ca1-4b8a-8c79-beec5040bd6b@opensynergy.com \
--to=peter.hilber@opensynergy.com \
--cc=cohuck@redhat.com \
--cc=jasowang@redhat.com \
--cc=parav@nvidia.com \
--cc=virtio-comment@lists.oasis-open.org \
/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