Re: [PATCH 7/7] iov_iter: remove iov_iter_is_aligned

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 04, 2025 at 11:25:08AM -0400, Mike Snitzer wrote:
> On Mon, Aug 04, 2025 at 08:16:39AM -0600, Keith Busch wrote:
> > On Fri, Aug 01, 2025 at 10:02:49PM -0400, Mike Snitzer wrote:
> > > On Fri, Aug 01, 2025 at 04:47:36PM -0700, Keith Busch wrote:
> > > > From: Keith Busch <kbusch@xxxxxxxxxx>
> > > > 
> > > > No more callers.
> > > > 
> > > > Signed-off-by: Keith Busch <kbusch@xxxxxxxxxx>
> > > 
> > > You had me up until this last patch.
> > > 
> > > I'm actually making use of iov_iter_is_aligned() in a series of
> > > changes for both NFS and NFSD.  Chuck has included some of the
> > > NFSD changes in his nfsd-testing branch, see:
> > > https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git/commit/?h=nfsd-testing&id=5d78ac1e674b45f9c9e3769b48efb27c44f4e4d3
> > > 
> > > And the balance of my work that is pending review/inclusion is:
> > > https://lore.kernel.org/linux-nfs/20250731230633.89983-1-snitzer@xxxxxxxxxx/
> > > https://lore.kernel.org/linux-nfs/20250801171049.94235-1-snitzer@xxxxxxxxxx/
> > > 
> > > I only need iov_iter_aligned_bvec, but recall I want to relax its
> > > checking with this patch:
> > > https://lore.kernel.org/linux-nfs/20250708160619.64800-5-snitzer@xxxxxxxxxx/
> > > 
> > > Should I just add iov_iter_aligned_bvec() to fs/nfs_common/ so that
> > > both NFS and NFSD can use it?
> > 
> > If at all possible, I recommend finding a place that already walks the
> > vectors and do an opprotunistic check for the alignments there. This
> > will save CPU cycles. For example, nfsd_iter_read already iterates the
> > bvec while setting each page. Could you check the alignment while doing
> > that instead of iterating a second time immediately after?
> 
> Nice goal, I'll see if I can pull it off.
> 
> I'm currently using iov_iter_is_aligned() in 3 new call sites (for
> READ and WRITE) in both NFS and NFSD: nfs_local_iter_init,
> nfsd_iter_read, nfsd_vfs_write
> 
> nfsd_vfs_write is the only one that doesn't iterate the bvec as-is,
> but it does work that _should_ obviate the need to doable check the
> alignment.

FYI, I was able to avoid using iov_iter_is_aligned() in favor of
checks in earlier code (in both NFSD and NFS).

Thanks,
Mike




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux