Subject: Re: envsys version 2 API
To: None <tech-kern@netbsd.org>
From: Juan RP <juan@xtrarom.org>
List: tech-kern
Date: 05/16/2007 00:58:13
On Thu, 10 May 2007 12:10:20 +0200
Juan RP <juan@xtrarom.org> wrote:

> I'm using a callout in sysmon_envsys.c to periodically check for the
> critical event, the timeout should be configurable and will be set by
> envstat.

After suggestion from Matt Thomas, I changed the code to not use a
dedicated kthread for this, but rather I'm using callout(9) and
workqueue(9), which runs at IPL_NONE.

Also I'm in the process to change the code to not use sysmon_pswitch,
as you pointed out. But I'd need some answers about the following:

1) You don't want to use the sysmon_pswitch infrastructure, that means
   I'll have to add (more or less) the same code to send and handle the
   events to /dev/sysmon rather than /dev/power. How to do that without
   adding the same code again? (BTW arch/landisk/dev/button.c is another
   file that duplicates sysmon_power.c).

2) I think it's enough to have only two critical events for all types
   except for the drive one. One for critical max and another one for
   critical min events. Do you agree? 

3) Should be the timeout of the callout configurable by the user
   (via envstat)?

4) Should a normal user be able to set critical limits via envstat, or
   only root?

That's all for now... thanks.

-- 
http://plog.xtrarom.org/
Juan RP's blog - NetBSD/pkgsrc news in Spanish