Re: [PATCH 2/2] ceph: use cephfs cgroup contoller to limit client ops

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

 



> Looking at the previous patch, get_token_bucket_throttle() blocks
> waiting for the requested tokens to become available.  This is not
> going to work because ceph_osdc_start_request() is called from all
> sorts of places, including the messenger worker threads.
>
> ceph_osdc_start_request() should never fail.  Treat it as a void
> function -- the return value is ignored in new code and the signature
> will eventually be updated to *req -> void.
>
> Thanks,
>
>                 Ilya

Hi, llya, thanks for your review:-)

We've already run this code in one of our cluster. It does work.
ceph_osdc_start_request() will not fail, because we treat tb->max
being 0 as shutting down the controller, and made sure that, before
setting tb->max to non-zero value, token bucket timer work is already
started and tb->throughput is not zero too. So if tb->max is 0, the
controller is shut down, and ceph_osdc_start_request() would behave
just like the code without the controller; if tb->max is not 0, the
token will be filled when the token bucket timer fires, in which case
ceph_osdc_start_request() would not fail, either. Am i right?
Thanks:-)



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

  Powered by Linux