Re: [PATCH] cifs: set ra_pages in backing_dev_info

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

 



added bug number to the patch description and merged into cifs-2.6.git

On Fri, Mar 25, 2011 at 3:25 PM, Jeff Layton <jlayton@xxxxxxxxxx> wrote:
> Commit 522440ed made cifs set backing_dev_info on the mapping attached
> to new inodes. This change caused a fairly significant read performance
> regression, as cifs started doing page-sized reads exclusively.
>
> By virtue of the fact that they're allocated as part of cifs_sb_info by
> kzalloc, the ra_pages on cifs BDIs get set to 0, which prevents any
> readahead. This forces the normal read codepaths to use readpage instead
> of readpages causing a four-fold increase in the number of read calls
> with the default rsize.
>
> Fix it by setting ra_pages in the BDI to the same value as that in the
> default_backing_dev_info.
>
> Cc: stable@xxxxxxxxxx
> Reported-and-Tested-by: Till <till2.schaefer@xxxxxxxxxxxxxxx>
> Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxx>
> ---
>  fs/cifs/cifsfs.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
> index 1af2470..fb6a2ad 100644
> --- a/fs/cifs/cifsfs.c
> +++ b/fs/cifs/cifsfs.c
> @@ -131,6 +131,7 @@ cifs_read_super(struct super_block *sb, void *data,
>                kfree(cifs_sb);
>                return rc;
>        }
> +       cifs_sb->bdi.ra_pages = default_backing_dev_info.ra_pages;
>
>  #ifdef CONFIG_CIFS_DFS_UPCALL
>        /* copy mount params to sb for use in submounts */
> --
> 1.7.4.1
>
>



-- 
Thanks,

Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux