Documentation/admin-guide/sysctl/fs.rst

Source file repositories/reference/linux-study-clean/Documentation/admin-guide/sysctl/fs.rst

File Facts

System
Linux kernel
Corpus path
Documentation/admin-guide/sysctl/fs.rst
Extension
.rst
Size
14296 bytes
Lines
375
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: documentation
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

===============================
Documentation for /proc/sys/fs/
===============================

Copyright (c) 1998, 1999,  Rik van Riel <riel@nl.linux.org>

Copyright (c) 2009,        Shen Feng<shen@cn.fujitsu.com>

For general info and legal blurb, please look in intro.rst.

------------------------------------------------------------------------------

This file contains documentation for the sysctl files and directories
in ``/proc/sys/fs/``.

The files in this directory can be used to tune and monitor
miscellaneous and general things in the operation of the Linux
kernel. Since some of the files *can* be used to screw up your
system, it is advisable to read both documentation and source
before actually making adjustments.

1. /proc/sys/fs
===============

Currently, these files might (depending on your configuration)
show up in ``/proc/sys/fs``:

.. contents:: :local:


aio-nr & aio-max-nr
-------------------

``aio-nr`` shows the current system-wide number of asynchronous io
requests.  ``aio-max-nr`` allows you to change the maximum value
``aio-nr`` can grow to.  If ``aio-nr`` reaches ``aio-nr-max`` then
``io_setup`` will fail with ``EAGAIN``.  Note that raising
``aio-max-nr`` does not result in the
pre-allocation or re-sizing of any kernel data structures.

dentry-negative
----------------------------

Policy for negative dentries. Set to 1 to always delete the dentry when a
file is removed, and 0 to disable it. By default, this behavior is disabled.

dentry-state
------------

This file shows the values in ``struct dentry_stat_t``, as defined in
``fs/dcache.c``::

  struct dentry_stat_t dentry_stat {
        long nr_dentry;
        long nr_unused;
        long age_limit;         /* age in seconds */
        long want_pages;        /* pages requested by system */
        long nr_negative;       /* # of unused negative dentries */
        long dummy;             /* Reserved for future use */
  };

Dentries are dynamically allocated and deallocated.

``nr_dentry`` shows the total number of dentries allocated (active
+ unused). ``nr_unused shows`` the number of dentries that are not
actively used, but are saved in the LRU list for future reuse.

``age_limit`` is the age in seconds after which dcache entries
can be reclaimed when memory is short and ``want_pages`` is
nonzero when ``shrink_dcache_pages()`` has been called and the

Annotation

Implementation Notes