]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cifs: pick channels for individual subrequests
authorShyam Prasad N <sprasad@microsoft.com>
Tue, 11 Feb 2025 10:00:25 +0000 (10:00 +0000)
committerSteve French <stfrench@microsoft.com>
Wed, 12 Feb 2025 00:51:07 +0000 (18:51 -0600)
commitf1bf10d7e909fe898a112f5cae1e97ce34d6484d
treed9891f56fe3e8457c2eaf63d6f7525f47c431236
parenta64dcfb451e254085a7daee5fe51bf22959d52d3
cifs: pick channels for individual subrequests

The netfs library could break down a read request into
multiple subrequests. When multichannel is used, there is
potential to improve performance when each of these
subrequests pick a different channel.

Today we call cifs_pick_channel when the main read request
is initialized in cifs_init_request. This change moves this to
cifs_prepare_read, which is the right place to pick channel since
it gets called for each subrequest.

Interestingly cifs_prepare_write already does channel selection
for individual subreq, but looks like it was missed for read.
This is especially important when multichannel is used with
increased rasize.

In my test setup, with rasize set to 8MB, a sequential read
of large file was taking 11.5s without this change. With the
change, it completed in 9s. The difference is even more signigicant
with bigger rasize.

Cc: <stable@vger.kernel.org>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/cifsglob.h
fs/smb/client/file.c