[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4d9499e3-4698-4d0c-b7bb-104023b29f3a@oracle.com>
Date: Wed, 12 Mar 2025 08:05:14 +0000
From: John Garry <john.g.garry@...cle.com>
To: Christoph Hellwig <hch@...radead.org>
Cc: brauner@...nel.org, djwong@...nel.org, cem@...nel.org,
linux-xfs@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org, ojaswin@...ux.ibm.com,
ritesh.list@...il.com, martin.petersen@...cle.com
Subject: Re: [PATCH v5 09/10] xfs: Allow block allocator to take an alignment
hint
On 12/03/2025 07:42, Christoph Hellwig wrote:
>> else if (ap->datatype & XFS_ALLOC_USERDATA)
>> align = xfs_get_extsz_hint(ap->ip);
>> +
>> + if (align > 1 && (ap->flags & XFS_BMAPI_EXTSZALIGN))
>> + args->alignment = align;
>> +
>
> Add a comment please.
ok
>
>> +/* Try to align allocations to the extent size hint */
>> +#define XFS_BMAPI_EXTSZALIGN (1u << 11)
>
> Shouldn't we be doing this by default for any extent size hint
> based allocations?
I'm not sure.
I think that currently users just expect extszhint to hint at the
granularity only.
Maybe users don't require alignment and adding an alignment requirement
just leads to more fragmentation.
>
>> bool found;
>> bool atomic_sw = flags & XFS_REFLINK_ATOMIC_SW;
>> + uint32_t bmapi_flags = XFS_BMAPI_COWFORK |
>> + XFS_BMAPI_PREALLOC;
>> +
>> + if (atomic_sw)
>> + bmapi_flags |= XFS_BMAPI_EXTSZALIGN;
>
> Please add a comment why you are doing this.
>
Sure
Thanks,
John
Powered by blists - more mailing lists