lkml.org 
[lkml]   [2008]   [Jan]   [14]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateMon, 14 Jan 2008 17:08:04 -0800
FromRandy Dunlap <>
SubjectRe: [RFC][PATCH 3/5] add /dev/mem_notify device
On Tue, 15 Jan 2008 10:01:21 +0900 KOSAKI Motohiro wrote:

> the core of this patch series.
> add /dev/mem_notify device for notification low memory to user process.
> 
> <usage examle>
> 
>         fd = open("/dev/mem_notify", O_RDONLY);
>         if (fd < 0) {
>                 exit(1);
>         }
>         pollfds.fd = fd;
>         pollfds.events = POLLIN;
>         pollfds.revents = 0;
> 	err = poll(&pollfds, 1, -1); // wake up at low memory
> 
>         ...
> </usage example>
> 
> Signed-off-by: Marcelo Tosatti <marcelo@kvack.org>
> Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> 
> ---
>  drivers/char/mem.c         |    6 ++
>  include/linux/mem_notify.h |   41 ++++++++++++++++
>  include/linux/mmzone.h     |    1 
>  mm/Makefile                |    2 
>  mm/mem_notify.c            |  109 +++++++++++++++++++++++++++++++++++++++++++++
>  mm/page_alloc.c            |    1 
>  6 files changed, 159 insertions(+), 1 deletion(-)
> 

Hi,

1/ I don't see the file below listed in the diffstat above...

2/ Where is the userspace interface information for the syscall?

> Index: linux-2.6.24-rc6-mm1-memnotify/Documentation/devices.txt
> ===================================================================
> --- linux-2.6.24-rc6-mm1-memnotify.orig/Documentation/devices.txt	2008-01-13 16:42:57.000000000 +0900
> +++ linux-2.6.24-rc6-mm1-memnotify/Documentation/devices.txt	2008-01-13 17:07:05.000000000 +0900
> @@ -96,6 +96,7 @@ Your cooperation is appreciated.
>  		 11 = /dev/kmsg		Writes to this come out as printk's
>  		 12 = /dev/oldmem	Used by crashdump kernels to access
>  					the memory of the kernel that crashed.
> +		 13 = /dev/mem_notify   Low memory notification.
> 
>    1 block	RAM disk
>  		  0 = /dev/ram0		First RAM disk


---
~Randy
--
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: 2008-01-15 01:13    [from the cache]
©2003-2008