Re: [PATCH] ceph: trigger the reclaim work once there has enough pending caps

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

 



On Tue, Nov 26, 2019 at 4:57 PM <xiubli@xxxxxxxxxx> wrote:
>
> From: Xiubo Li <xiubli@xxxxxxxxxx>
>
> The nr in ceph_reclaim_caps_nr() is very possibly larger than 1,
> so we may miss it and the reclaim work couldn't triggered as expected.
>
> Signed-off-by: Xiubo Li <xiubli@xxxxxxxxxx>
> ---
>  fs/ceph/mds_client.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
> index 08b70b5ee05e..547ffe16f91c 100644
> --- a/fs/ceph/mds_client.c
> +++ b/fs/ceph/mds_client.c
> @@ -2020,7 +2020,7 @@ void ceph_reclaim_caps_nr(struct ceph_mds_client *mdsc, int nr)
>         if (!nr)
>                 return;
>         val = atomic_add_return(nr, &mdsc->cap_reclaim_pending);
> -       if (!(val % CEPH_CAPS_PER_RELEASE)) {
> +       if (val / CEPH_CAPS_PER_RELEASE) {
>                 atomic_set(&mdsc->cap_reclaim_pending, 0);
>                 ceph_queue_cap_reclaim_work(mdsc);
>         }

this will call ceph_queue_cap_reclaim_work too frequently

> --
> 2.21.0
>



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Ceph Dev]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux