1PROC_FLUSH_TASK(9)            The proc filesystem           PROC_FLUSH_TASK(9)
2
3
4

NAME

6       proc_flush_task - Remove dcache entries for task from the /proc dcache.
7

SYNOPSIS

9       void proc_flush_task(struct task_struct * task);
10

ARGUMENTS

12       task
13           task that should be flushed.
14

DESCRIPTION

16       When flushing dentries from proc, one needs to flush them from global
17       proc (proc_mnt) and from all the namespaces' procs this task was seen
18       in. This call is supposed to do all of this job.
19
20       Looks in the dcache for /proc/pid /proc/tgid/task/pid if either
21       directory is present flushes it and all of it'ts children from the
22       dcache.
23
24       It is safe and reasonable to cache /proc entries for a task until that
25       task exits. After that they just clog up the dcache with useless
26       entries, possibly causing useful dcache entries to be flushed instead.
27       This routine is proved to flush those useless dcache entries at process
28       exit time.
29

NOTE

31       This routine is just an optimization so it does not guarantee that no
32       dcache entries will exist at process exit time it just makes it very
33       unlikely that any will persist.
34
36Kernel Hackers Manual 3.10         June 2019                PROC_FLUSH_TASK(9)
Impressum