'\" t .\" Title: proc_flush_task .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: May 2018 .\" Manual: The proc filesystem .\" Source: Kernel Hackers Manual 3.16.56 .\" Language: English .\" .TH "PROC_FLUSH_TASK" "9" "May 2018" "Kernel Hackers Manual 3\&.16\&" "The proc filesystem" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" proc_flush_task \- Remove dcache entries for \fItask\fR from the /proc dcache\&. .SH "SYNOPSIS" .HP \w'void\ proc_flush_task('u .BI "void proc_flush_task(struct\ task_struct\ *\ " "task" ");" .SH "ARGUMENTS" .PP \fItask\fR .RS 4 task that should be flushed\&. .RE .SH "DESCRIPTION" .PP When flushing dentries from proc, one needs to flush them from global proc (proc_mnt) and from all the namespaces\*(Aq procs this task was seen in\&. This call is supposed to do all of this job\&. .PP Looks in the dcache for /proc/\fIpid\fR /proc/\fItgid\fR/task/\fIpid\fR if either directory is present flushes it and all of it\*(Aqts children from the dcache\&. .PP It is safe and reasonable to cache /proc entries for a task until that task exits\&. After that they just clog up the dcache with useless entries, possibly causing useful dcache entries to be flushed instead\&. This routine is proved to flush those useless dcache entries at process exit time\&. .SH "NOTE" .PP This routine is just an optimization so it does not guarantee that no dcache entries will exist at process exit time it just makes it very unlikely that any will persist\&. .SH "COPYRIGHT" .br