From nobody Wed Jun 05 20:30:37 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VvfH50VkNz5M7Hg; Wed, 05 Jun 2024 20:30:41 +0000 (UTC) (envelope-from se@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VvfH502GXz4nnh; Wed, 5 Jun 2024 20:30:41 +0000 (UTC) (envelope-from se@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717619441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=0kZJAdXndUPlDtx397APW9r192YaSOwSUAy5uW2KlYM=; b=TOBWMRNi1FOMtqzdoi6cBwkLLmb6XXUrIULd9KdYi0B4ckHz5fn3iEgshYpszOEzHLtMDJ l5FP4pkgvsDfLXkKVtsQNhZNmjoa+VVSbLr0GQvpqndNAOsXKn9kor0zUS7bh9Lg/s2AJS nYlImpeLgnUIYib0YP/95WypP+tREsBm5ykbRyG3cXFpFZ8/QJdQa2DNMkA6zwHXsHUqck 3GO4UWxVokf+rcpQbG2y8Wv8bTSKJbgywjAOhhdKq+pIH13rNlTHRAAqiOfzgyxtU8zEM2 xN1NGcGQSeV/gnbhCfuGscQMbjBQ/Z/lAs2AvvrO09sdcVfelz3Nbyh1ohutqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717619441; a=rsa-sha256; cv=none; b=m/tz8uzkv4Qv4x6vE2/7jun3zmhVk6PLmooywcY8iUYsj/P4UXVQtdQKjTyHLWHTE3Vpzr 2aHmyFEQ/PO2jDskW/TQLbLJqwSS9bD3WVYKifnDqfLHa5YXbwczPKBCObQ9VRTCb1ukHn uFhC3ojY5xABqQLFkF+chfma7bTpf2OtwAMYBSWyxXY46Yy1S7BuWeZWmQWqQ8SyXceV9a ps7adA2dI3N4YXIBpOA/4zDsx8+1Wvf+p9s2f3WFtmj9K5NZc4saNETxdYiwp4foP3CPIe v8mCcPAUOmpmVbuBzd+iobVUklBaRKAK+cEQ54nsTklc5Dv3FGFf9cvyQp/SwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717619441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=0kZJAdXndUPlDtx397APW9r192YaSOwSUAy5uW2KlYM=; b=V5/454Xw78ou/jpSWif4ljDoRXBS5bXJgp4B1i68p45n177ra07Ix73ECMnCzhKj4ScZ0x YQEM1MTti1XJx1wQrNMTCfQSgAMJBXMjUIp+GG+0uzxq6U8ewj/9sTCIpqQ7UbcjeNHaZL ibH96b165if+Pm90GdK+8DcKVjCyfCnAAhcrBtoB1KzLfRBga0rBUKGF0AqHbV/SocQgJv +zA0foASM3vFjM3rvQfFgGSUm5yWvJyYaYFx1SHG0vAU3PDkUYi7Oul8sXjLjDwWMD3Ye0 mZ0z7K3Q+/E+roPxRESw5/zrAxQGCrhjcqJDoNe2z4RTWF1/FjmImlJVC0cFFw== Received: from [192.168.119.168] (p5dc83c4c.dip0.t-ipconnect.de [93.200.60.76]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: se/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4VvfH407JQz14wB; Wed, 5 Jun 2024 20:30:39 +0000 (UTC) (envelope-from se@freebsd.org) Message-ID: Date: Wed, 5 Jun 2024 22:30:37 +0200 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: =?UTF-8?Q?Stefan_E=C3=9Fer?= Subject: Re: git: 077f757d72e5 - main - newfs_msdos: align data area to VM page boundary by default To: Konstantin Belousov , Jessica Clarke , Shawn Webb Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" References: <202406021227.452CRx8I007470@gitrepo.freebsd.org> <6D077B35-48BA-4516-BAB7-0B23CD3AB042@freebsd.org> Content-Language: de-DE, en-US Autocrypt: addr=se@freebsd.org; keydata= xsBNBFVxiRIBCADOLNOZBsqlplHUQ3tG782FNtVT33rQli9EjNt2fhFERHIo4NxHlWBpHLnU b0s4L/eItx7au0i7Gegv01A9LUMwOnAc9EFAm4EW3Wmoa6MYrcP7xDClohg/Y69f7SNpEs3x YATBy+L6NzWZbJjZXD4vqPgZSDuMcLU7BEdJf0f+6h1BJPnGuwHpsSdnnMrZeIM8xQ8PPUVQ L0GZkVojHgNUngJH6e21qDrud0BkdiBcij0M3TCP4GQrJ/YMdurfc8mhueLpwGR2U1W8TYB7 4UY+NLw0McThOCLCxXflIeF/Y7jSB0zxzvb/H3LWkodUTkV57yX9IbUAGA5RKRg9zsUtABEB AAHNJ1N0ZWZhbiBFw59lciAoRnJlZUJTRCkgPHNlQGZyZWVic2Qub3JnPsLAlAQTAQoAPgIb AwULCQgHAwUVCgkICwUWAwIBAAIeAQIXgBYhBKNx6m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5CEL9UUgusITGeoXnknFOnCeXhYWDBcafZ/xheIsAxx21K gtTJev3Vk3FTxvi05MDV3Rl/14gpmB9iQSBGGY47MrECsRIo2o0Q3QUlxS1OuXfiL/yewDEH a2LZaRRJsgZ6l7xWtKnu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Am 05.06.24 um 00:25 schrieb Konstantin Belousov: > On Tue, Jun 04, 2024 at 08:39:16AM +0200, Stefan Eßer wrote: >> Am 03.06.24 um 19:25 schrieb Jessica Clarke: >>> On 2 Jun 2024, at 13:27, Stefan Eßer wrote: >>>> >>>> The branch main has been updated by se: >>>> >>>> URL: https://cgit.FreeBSD.org/src/commit/?id=077f757d72e561eb84193d8e58f63e96e69b8096 >>>> >>>> commit 077f757d72e561eb84193d8e58f63e96e69b8096 >>>> Author: Stefan Eßer >>>> AuthorDate: 2024-06-02 12:07:52 +0000 >>>> Commit: Stefan Eßer >>>> CommitDate: 2024-06-02 12:07:52 +0000 >>>> >>>> newfs_msdos: align data area to VM page boundary by default >> [...] >>> >>> Hi, >>> This has completely broken[1] all of the Linux and macOS cross-build CI >>> jobs (which pass -DWITH_DISK_IMAGE_TOOLS_BOOTSTRAP). Please either fix >>> this promptly or back it out until you can do so. >>> >>> Jess >>> >>> [1] See https://github.com/freebsd/freebsd-src/actions/runs/9338256762 >> >> Thank you for the report and sorry for the breakage. >> >> This should be fixed in commit 41ee91c64f47faaa by skipping the >> alignment of the data area, if PAGE_SIZE is not defined. >> >> An alternative approach would have been to define PAGE_SIZE to a >> sane default value of 4096 (as used on most current architectures >> by default), if not set in the build environment. >> >> If there is consensus that this would be more appropriate (since >> it matches what the man page says), I'd revert the latest commit >> and instead of it commit the following change: > I believe this is a better approach. > It does not unexpectedly hide some code. There is an even simpler solution, which restores identical build results on FreeBSD, MacOS, and Linux: Always adjusting to a multiple of the cluster size works for all page sizes. Adjusting to a granularity of > 4 KB is not required to fix the buffer cache misalignment, but large clusters are only useful on very large volumes (i.e., with more than 2000 clusters, else a smaller cluster would be more efficient). I have updated the previous review: https://reviews.freebsd.org/D45436 index 1bca560a59e1..dcc2bb982efc 100644 --- a/sbin/newfs_msdos/mkfs_msdos.c +++ b/sbin/newfs_msdos/mkfs_msdos.c @@ -568,14 +568,7 @@ x1 += (bpb.bpbBigFATsecs - 1) * bpb.bpbFATs; } if (set_res) { - if (o.align) - alignto = bpb.bpbSecPerClust; - else -#ifdef PAGE_SIZE - alignto = PAGE_SIZE / bpb.bpbBytesPerSec; -#else - alignto = 1; -#endif + alignto = bpb.bpbSecPerClust; if (alignto > 1) { /* align data clusters */ Best regards, STefan