Commit Graph

17473 Commits

Author SHA1 Message Date
Michael Kerrisk de694c9840 pipe.7: Clarify that default pipe capacity is 16 pages
The statement that the default pipe capacity is 65536 bytes
is accurate only on systems where the page size is 4096B.
See the use of PIPE_DEF_BUFFERS in the kernel source.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-02-10 08:58:18 +01:00
Michael Kerrisk 015c503468 vfork.2: Explain why the child should not call exit(3)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-02-10 08:58:18 +01:00
Michael Kerrisk f3d0d38ecc vfork.2: SEE ALSO: add _exit(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-02-10 08:58:18 +01:00
Michael Kerrisk c76ea16ab4 fts.3: Clarify meaning of zero as 'instr' value for fts_set()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-02-10 08:58:18 +01:00
Michael Kerrisk 71ddeb19dc fts.3: Improve explanation of 'fts_errno'
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-02-10 08:58:17 +01:00
Michael Kerrisk 90882d77f2 fts.3: Give a hint that there are further fields in the FTSENT structure
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-02-10 08:58:17 +01:00
Michael Kerrisk 6110d89af1 fts.3: Fix minor error in FTSENT structure definition
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-02-10 08:58:17 +01:00
Michael Kerrisk 17b0c3ad68 fts.3: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-02-10 08:58:17 +01:00
Michael Kerrisk 822ffd7cb6 fts.3: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-02-10 08:58:17 +01:00
Michael Kerrisk 1fcf641193 fts.3: Use better argument name for fts_children() and fts_set()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-02-10 08:58:07 +01:00
Michael Kerrisk 8b65f73d05 fts.3: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-02-05 20:03:47 +01:00
Michael Kerrisk 5c71ea83df fts.3: Minor wording fix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-02-05 12:10:58 +01:00
Michael Kerrisk c9e5b0e128 fts.3: Minor fix: make the meaning of "stream" a little more obvious
"Stream" was used lower in the page, without first
being defined.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-02-05 12:10:58 +01:00
Michael Kerrisk f6c7968375 fts.3: Minor wording fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-02-05 12:10:58 +01:00
Michael Kerrisk 58c744401a fts.3: grfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-02-05 12:10:58 +01:00
Michael Kerrisk 211c7df8cf hsearch.3: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-02-05 08:50:24 +01:00
Jakub Wilk 6ade226b38 man.7, uri.7: Use "www.kernel.org" in example URLs
Apparently www.kernelnotes.org is now a spam site.

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-02-05 00:03:08 +13:00
Jakub Wilk 0a9755c6f7 netlink.7: Update libnl homepage URL
The original URL is 404.

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-02-05 00:00:48 +13:00
Jakub Wilk 0db39ccfae mtrace.1: ffix
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-02-04 23:29:17 +13:00
Jakub Wilk df525461a4 core.5: tfix
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-02-03 16:40:30 +13:00
Michael Kerrisk 1ed246aedd printf.3: Fix a small bug in example code
Move the second call to va_end(ap) to above the if-block that
precedes it, so that the va_list 'ap' will be cleaned up in
all cases.

Reported-by: Erik Roland van der Meer <ervdmeer@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-02-02 09:33:04 +13:00
Michael Kerrisk 5d048f53d3 strerror.3: Minor tweak's to Heinrich Schuchardt's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-02-02 09:13:02 +13:00
Michael Kerrisk 154e01afc1 strerror.3: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-02-02 09:11:37 +13:00
Heinrich Schuchardt e9cf84ab1d strerror.3: Indicate reasonable buffer size for strerror_r() and strerror_l()
Add a hint which buffer size is needed for
strerror_r() and strerror_l().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-02-02 09:09:51 +13:00
Michael Kerrisk 877755733b Merge branch 'master' of ra.kernel.org:/pub/scm/docs/man-pages/man-pages 2017-02-02 08:35:03 +13:00
Michael Kerrisk 9f2791e93e explicit_bzero.3: New link to bzero.3
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-02-02 08:25:18 +13:00
Michael Kerrisk 55e04d2370 bzero.3: Document explicit_bzero() (new in glibc 2.25)
Also, reword the description of bzero somewhat.

By now, over time, I've completely rewritten the page,
so change the copyright as well.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-02-02 08:25:18 +13:00
Michael Kerrisk 879091c911 bcmp.3, bcopy.3, bzero.3, memccpy.3, memchr.3, memcmp.3, memcpy.3, memfrob.3, memmem.3, memmove.3, memset.3: SEE ALSO: add bstring(3)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-02-02 08:25:18 +13:00
Michael Kerrisk 2cbb6fb4e9 getrandom.2: Starting with glibc 2.25, getrandom() is now declared in <sys/random.h>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-02-02 08:25:18 +13:00
Michael Kerrisk 089527aabd core.5: Reorder a bullet list
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-01-30 11:39:30 +13:00
Michael Kerrisk 9d8b225095 core.5: Clarify that dumping program's initial CWD is root directory
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-01-30 11:30:03 +13:00
Michael Kerrisk 1c3aae54d2 core.5: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-01-30 11:24:14 +13:00
Michael Kerrisk aee4257750 core.5: The target of core dump piping can also be a script
Verified by experiment.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-01-30 10:46:25 +13:00
Jakub Wilk 5465ae9568 futex.2, open_by_handle_at.2, seccomp.2, socket.2, console_codes.4, protocols.5, aio.7, capabilities.7, libc.7, netlink.7, raw.7, standards.7, unicode.7, uri.7, vdso.7: tfix
Escape hyphens in URLs.

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-01-30 08:33:49 +13:00
Jakub Wilk ff391afb77 man-pages.7: tfix
Escape hyphens when explaining how to escape hyphens.

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-01-30 08:33:24 +13:00
Erik Kline 768b58c715 getenv.3: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-01-27 08:45:31 +13:00
Jakub Wilk bb1639a237 mlock.2: tfix
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-01-27 08:41:57 +13:00
Jakub Wilk 3a9b4c11e8 mlock.2: tfix
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-01-27 08:14:37 +13:00
Michael Kerrisk 3bd859bfaf mmap.2: mincore(2) can be used to discover which pages of a mapping are resident
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-01-26 17:09:25 +13:00
Michael Kerrisk a8db50d35a madvise.2: Note that madvise() is generally about improving performance
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-01-26 16:51:32 +13:00
Michael Kerrisk 268612340a posix_fadvise.2: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-01-26 16:21:42 +13:00
Michael Kerrisk ba759b3c39 posix_fadvise.2: One can use open(2) + mmap(2) + mincore(2) as a 'fincore'
Note that open(2) + mmap(2) + mincore(2) to get a view of which
pages of a file are currently cached.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-01-26 16:21:42 +13:00
Michael Kerrisk 38ca12203c posix_fadvise.2: Mention /proc/sys/vm/drop_caches
It may be helpful for the reader of this page to know about
/proc/sys/vm/drop_caches.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-01-26 16:21:42 +13:00
Michael Kerrisk 6f22eabf14 mincore.2: SEE ALSO: add madvise(2), posix_fadvise(2), posix_madvise(3)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-01-26 16:21:42 +13:00
Michael Kerrisk 15ef1edc77 mlock.2: SEE ALSO: add mincore(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-01-26 16:21:42 +13:00
Michael Kerrisk 7ba63e47a6 fsync.2: SEE ALSO: add posix_fadvise(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-01-26 16:21:42 +13:00
Michael Kerrisk 250d41b91b posix_fadvise.2: SEE ALSO: mincore(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-01-26 16:21:41 +13:00
Michael Kerrisk f90b94e32c posix_fadvise.2: Note that POSIX_FADV_DONTNEED *may* try to write back dirty pages
Looking at the code in mm/fadvise.c, we have

    case POSIX_FADV_DONTNEED:
        if (!inode_write_congested(mapping->host))
            __filemap_fdatawrite_range(mapping, offset, endbyte,
                                       WB_SYNC_NONE);

This suggests that *if* the backing device is not congested, then
__filemap_fdatawrite_range() is called. The comments for that
function say:

    __filemap_fdatawrite_range - start writeback on mapping dirty pages in range

So, my reading of this is that *maybe* some dirty pages will be
written to the backing device by the time that POSIX_FADV_DONTNEED
gets to calling invalidate_mapping_pages() whose description says:

/**
 * invalidate_mapping_pages - Invalidate all the unlocked pages of one inode
 * @mapping: the address_space which holds the pages to invalidate
 * @start: the offset 'from' which to invalidate
 * @end: the offset 'to' which to invalidate (inclusive)
 *
 * This function only removes the unlocked pages, if you want to
 * remove all the pages of one inode, you must call truncate_inode_pages.
 *
 * invalidate_mapping_pages() will not block on IO activity. It will not
 * invalidate pages which are dirty, locked, under writeback or mapped into
 * pagetables.
 */

So, my reading of this is that the handling of dirty pages is an
optimization. If some pages can be written in time, they will be
freed by POSIX_MADV_DONTFREE. But there are no guarantees.

All of that said, some experimentation suggests that, in a lot
of cases, POSIX_MADV_DONTFREE does often free dirty pages.

See https://bugzilla.kernel.org/show_bug.cgi?id=95421.

Reported-by: Maik Zumstrull <maik@zumstrull.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-01-26 16:20:45 +13:00
Michael Kerrisk a6b80261c8 posix_fadvise.2: Reorganize some text
Details for various flags were hidden under NOTES.
Move them to DESCRIPTION, to make the details more
obvious.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-01-26 15:03:17 +13:00
Michael Kerrisk dfbb4842f9 write.2: Alert the reader that there is a limit on 'count'
See https://bugzilla.kernel.org/show_bug.cgi?id=86061

Reported-by: Kai NODA <nodakai@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-01-26 15:03:17 +13:00