Re: /proc/PID bug, it seems

From: Nick Holloway (Nick.Holloway@alfie.demon.co.uk)
Date: Tue Feb 29 2000 - 03:27:10 EST


desar@club-internet.fr (=?iso-8859-1?Q?Fran=E7ois=20D=E9sarm=E9nien?=) writes:
> I already post a message about this two weeks ago, an as I haven't
> had any suggestion, I repost. Sorry for any inconvenience, but
> I think (and you probably too) that bugs, whatever they are
> should be tracked and eliminated. And this looks to me like
> a /proc bug. But maybe I'm missing something...

The main point you are missing is that a process is not completely swapped
in, or completely swapped out. Although the processes are active,
only the current working set (the pages that are actually being used)
are swapped in. Pages from the process that are not being used will be
left in swap or on disk.

The page that contains argv and envp (which is overwritten by
setproctitle) is not being accessed by the Oracle process, and is not
forced into memory.

The Linux /proc code has _never_ forced this area into memory when
/proc/$$/cmdline is read. To do so could lead to trashing the current
working set of the machine, just to produce information for ps.

If it really that important for the name to appear in the process
listing, then Oracle could arrange for their daemons to periodically
force the argv and envp into memory by reading it. This is effectively
what happens with other processes such as sendmail, which keep updating
using setproctitle().

-- 
 `O O'  | Nick.Holloway@alfie.demon.co.uk
// ^ \\ | http://www.alfie.demon.co.uk/

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



This archive was generated by hypermail 2b29 : Tue Feb 29 2000 - 21:00:21 EST