lkml.org 
[lkml]   [2010]   [Jan]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [suspend/resume] Re: userspace notification from module
From
Date
Dnia 2 stycznia 2010 19:26 	Bartłomiej Zimoń <uzi18@o2.pl> napisał(a):
> Dnia 2 stycznia 2010 16:56 Daniel Borkmann <danborkmann@googlemail.com> napisał(a):
> > Hi Andy,
> >
> > 2010/1/2 Andy Walls <awalls@radix.net>:
> > > Why not:
> > >
> > > a. write a module that implements a device node that supports poll(),
> > > and
> > >
> > > b. have a user space process select() on the fd for read or exception
> > > notification
> > >
> > > ?
> >
> > This is, of course, another possible solution that is more "cleaner"
> > than the one with the signals.
> > Then, your userspace program would have another thread polling for the
> > device node. Question is which timeout would be appropriate to be "CPU
> > friendly" and to keep notification latency short?
> >
>
> Just need as fast as possible solution and on the other hand acceptable for kernel sources.
> Usually programs needs just to disconnect something or set one flag.
> Even if program will have no time for this it could be enough just to send this precious info.
>

first draft: http://starowa.one.pl/~uzi/pld/pm-notify.c

# tail -f /var/log/kernel |grep pm-notify
Jan 2 21:37:19 topijna kernel: pm-notify: suspend prepare
Jan 2 21:38:18 topijna kernel: pm-notify: suspend prepare
Jan 2 21:39:05 topijna kernel: pm-notify: suspend prepare
Jan 2 21:43:38 topijna kernel: pm-notify: suspend prepare
Jan 2 21:51:31 topijna kernel: pm-notify: suspend prepare
Jan 2 21:53:59 topijna kernel: pm-notify: hibernation prepare
But dont know why have loop here:

$ hexdump /dev/test
0000000 0033 0000 0033 0000 0033 0000 0033 0000
*
31424480 0033 0000 0033 0000 0031 0000 0031 0000
31424490 0031 0000 0031 0000 0031 0000 0031 0000
*
$
Best regards.
Barłomiej Zimoń
PLD Linux, Kadu Team

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-01-02 22:23    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site