unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
From: Eric Wong <e@80x24.org>
To: Alyssa Ross <hi@alyssa.is>
Cc: meta@public-inbox.org
Subject: Re: [PATCH 2/2] treewide: lose F_SETPIPE_SZ page size assumptions
Date: Tue, 7 Jan 2025 22:26:56 +0000	[thread overview]
Message-ID: <20250107222656.M989952@dcvr> (raw)
In-Reply-To: <20250107174624.1504268-3-hi@alyssa.is>

Alyssa Ross <hi@alyssa.is> wrote:
> fcntl(2) is documented as rounding up sizes to an integer multiple of
> the page size.  When a pipe buffer as small as possible is desired,
> it's cleaner to pass 0 and let the kernel set the pipe buffer to
> exactly one page than it is to assume that pages are 4096 bytes.

OK.  I suppose the Linux kernel has enough testers that it's
chances of it mishandling someday 0 would be caught before any
release.

> Currently, Linux doesn't support pages smaller than 4096 bytes, so this 
> is a purely stylistic change, but I think it will help avoid future 
> bugs caused by assuming page sizes are 4096 bytes.

I'm not 100% convinced it's worth the noise since I expect page
sizes to move towards larger sizes in future arches.  However, I
don't think it conflicts with anything that's being worked on
atm; so leaning towards applying...  Will think about it.

  reply	other threads:[~2025-01-07 22:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-07 17:46 [PATCH 1/2] t/lei-sigpipe.t: use correct pipe size Alyssa Ross
2025-01-07 17:46 ` [PATCH 2/2] treewide: lose F_SETPIPE_SZ page size assumptions Alyssa Ross
2025-01-07 22:26   ` Eric Wong [this message]
2025-01-08  4:51     ` Eric Wong
2025-01-09 16:59       ` Alyssa Ross
2025-01-07 22:22 ` [PATCH 1/2] t/lei-sigpipe.t: use correct pipe size Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250107222656.M989952@dcvr \
    --to=e@80x24.org \
    --cc=hi@alyssa.is \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).