public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: Posible memory leak!?
@ 2003-05-13 18:15 Boris Kurktchiev
  2003-05-14  6:56 ` Denis Vlasenko
  0 siblings, 1 reply; 14+ messages in thread
From: Boris Kurktchiev @ 2003-05-13 18:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: vda

top - 11:03:41 up 4 min,  1 user,  load average: 0.12, 0.20, 0.09
Tasks:  60 total,   1 running,  58 sleeping,   0 stopped,   1 zombie
Cpu(s):   8.3% user,   2.3% system,   0.0% nice,  89.4% idle
Mem:    385904k total,   173996k used,   211908k free,    14244k buffers
Swap:   128512k total,        0k used,   128512k free,    86732k cached

this is what the machine used to look like.

this is what happens when the machine has run for about 3 hours, and during 
that time I have had Netbeans and Day Of Defeat(wine) running for about 15 
minutes.

top - 14:14:49 up  2:31,  1 user,  load average: 0.03, 0.04, 0.01
Tasks:  60 total,   2 running,  57 sleeping,   0 stopped,   1 zombie
Cpu(s):   2.7% user,   0.3% system,   0.0% nice,  97.0% idle
Mem:    385904k total,   261368k used,   124536k free,    16736k buffers
Swap:   128512k total,     8768k used,   119744k free,   175476k cached

if i leave the machine on, and say I start transcoding something.. the RAM 
would not be touched and the swap usage would shoot up to 95%.


^ permalink raw reply	[flat|nested] 14+ messages in thread
* [RFC]  new syscall to allow notification when arbitrary pids die
@ 2003-05-10  6:29 Chris Friesen
  2003-05-12  3:26 ` Chris Friesen
  0 siblings, 1 reply; 14+ messages in thread
From: Chris Friesen @ 2003-05-10  6:29 UTC (permalink / raw)
  To: Linux Kernel Mailing List


I would like to get some comments on a new syscall that I am planning on 
implementing.  This syscall would allow a process to register to be notified 
when another process dies.  The calling process would specify the pid of the 
process in which it is interested and the signal which it wants to be sent when 
the process with the specified pid dies.  The api would be:

int sigexit(pid_t pid, int signum)

The implementation would add a new linked list to the task struct which would 
store pid/signal tuples for each process requesting notification.  On process 
death, in do_notify_parent we walk the list and send the specified signals to 
all the listeners.

I see two immediate uses for this.  One would be to enable a "watcher" process 
which can do useful things on the death of processes which registered with it 
(logging, respawning, notifying other processes, etc).  The watcher could keep a 
persistant list of what its monitoring and what for in a file, and if it ever 
died, the new watcher could scan the list and register to watch them all again. 
The second would be to enable mutual suicide pacts between processes. (I'm not 
sure when I would use this, but it sounds kind of fun.)

Anyone have any opinions on this?  There is a comment in exit_notify about not 
sending signals to arbitrary processes using the thread signals, but I'm not 
sure if that objection was to the idea or to the implementation.

Thanks,

Chris



-- 
Chris Friesen                    | MailStop: 043/33/F10
Nortel Networks                  | work: (613) 765-0557
3500 Carling Avenue              | fax:  (613) 765-2986
Nepean, ON K2H 8E9 Canada        | email: cfriesen@nortelnetworks.com


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2003-05-16  8:37 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-13 18:15 Posible memory leak!? Boris Kurktchiev
2003-05-14  6:56 ` Denis Vlasenko
2003-05-14 14:12   ` Boris Kurktchiev
2003-05-15  5:51     ` Denis Vlasenko
2003-05-15 14:24       ` Boris Kurktchiev
2003-05-16  8:48         ` Denis Vlasenko
2003-05-16  4:03   ` The kernel is miscalculating my RAM Boris Kurktchiev
2003-05-16  5:42     ` Chris Friesen
2003-05-16  6:48       ` Boris Kurktchiev
2003-05-16  6:50       ` Boris Kurktchiev
  -- strict thread matches above, loose matches on Subject: below --
2003-05-10  6:29 [RFC] new syscall to allow notification when arbitrary pids die Chris Friesen
2003-05-12  3:26 ` Chris Friesen
2003-05-12  3:32   ` Doug McNaught
2003-05-12  3:42     ` Posible memory leak!? Boris Kurktchiev
2003-05-12 11:17       ` Boris Kurktchiev
     [not found]         ` <200305131158.h4DBw2u30860@Port.imtp.ilyichevsk.odessa.ua>
2003-05-13 18:17           ` Boris Kurktchiev
2003-05-12 18:06       ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox