
Instead of pulling in process tables itself, ProcFS now queries the MIB service for process information. This reduces ProcFS's memory usage by about 1MB. The change does have two negative consequences. First, getting all the original /proc/<pid>/psinfo fields filled in would take a lot of extra effort. Since the only program that uses those files at all is mtop(1), we reformat psinfo to expose only the information used by mtop(1). This means that with this patch, older copies of MINIX3 ps and top will cease to work. Second, since both MIB and ProcFS update their own view of the process list only once per clock tick, ProcFS' view may now be outdated by up to two clock ticks. This is unlikely to pose a problem in practice. Change-Id: Iaa6b60450c8fb52d092962394d33d08bd638bc01
25 lines
478 B
C
25 lines
478 B
C
#ifndef _PROCFS_INC_H
|
|
#define _PROCFS_INC_H
|
|
|
|
#include <minix/drivers.h>
|
|
#include <minix/param.h>
|
|
#include <minix/sysctl.h>
|
|
#include <minix/sysinfo.h>
|
|
#include <minix/vtreefs.h>
|
|
#include <minix/procfs.h>
|
|
#include <assert.h>
|
|
|
|
#include <machine/archtypes.h>
|
|
#include "kernel/const.h"
|
|
#include "kernel/type.h"
|
|
#include "kernel/proc.h"
|
|
#include "vfs/const.h"
|
|
#include "vfs/dmap.h"
|
|
|
|
#include "const.h"
|
|
#include "type.h"
|
|
#include "proto.h"
|
|
#include "glo.h"
|
|
|
|
#endif /* _PROCFS_INC_H */
|