From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 21DC41F4CC; Tue, 7 Jan 2025 22:26:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1736288817; bh=16Xa2Tt9Ot48MQhcEJEjcVId2bAMEm38toa8GWiSUW8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=F24e7+mLqUciOJF5LmQYxuE9wRc1ebnbk64IYGxPUtAfCrVMAZjJlXlegjJgqRW0i s3GNSCgX/n7GrnEgtloGlyxakzYIZDQ0bG51dxfsTMeOyRuaIIC8XsYk7kD2lWg4nY WFlibcQYMH6//hk8NOyC4kCKpFHHYCmzY6wD0rBo= Date: Tue, 7 Jan 2025 22:26:56 +0000 From: Eric Wong To: Alyssa Ross Cc: meta@public-inbox.org Subject: Re: [PATCH 2/2] treewide: lose F_SETPIPE_SZ page size assumptions Message-ID: <20250107222656.M989952@dcvr> References: <20250107174624.1504268-1-hi@alyssa.is> <20250107174624.1504268-3-hi@alyssa.is> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20250107174624.1504268-3-hi@alyssa.is> List-Id: Alyssa Ross 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.