Re: [PATCH 0/5] flush the mdlog before waiting on unsafe reqs

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

 



On Tue, 2021-06-29 at 12:42 +0800, xiubli@xxxxxxxxxx wrote:
> From: Xiubo Li <xiubli@xxxxxxxxxx>
> 
> For the client requests who will have unsafe and safe replies from
> MDS daemons, in the MDS side the MDS daemons won't flush the mdlog
> (journal log) immediatelly, because they think it's unnecessary.
> That's true for most cases but not all, likes the fsync request.
> The fsync will wait until all the unsafe replied requests to be
> safely replied.
> 
> Normally if there have multiple threads or clients are running, the
> whole mdlog in MDS daemons could be flushed in time if any request
> will trigger the mdlog submit thread. So usually we won't experience
> the normal operations will stuck for a long time. But in case there
> has only one client with only thread is running, the stuck phenomenon
> maybe obvious and the worst case it must wait at most 5 seconds to
> wait the mdlog to be flushed by the MDS's tick thread periodically.
> 
> This patch will trigger to flush the mdlog in all the MDSes manually
> just before waiting the unsafe requests to finish.
> 
> 

This seems a bit heavyweight, given that you may end up sending
FLUSH_MDLOG messages to mds's on which you're not waiting. What might be
best is to scan the list of requests you're waiting on and just send
these messages to those mds's.

Is that possible here?

> 
> 
> Xiubo Li (5):
>   ceph: export ceph_create_session_msg
>   ceph: export iterate_sessions
>   ceph: flush mdlog before umounting
>   ceph: flush the mdlog before waiting on unsafe reqs
>   ceph: fix ceph feature bits
> 
>  fs/ceph/caps.c               | 35 ++++----------
>  fs/ceph/mds_client.c         | 91 +++++++++++++++++++++++++++---------
>  fs/ceph/mds_client.h         |  9 ++++
>  include/linux/ceph/ceph_fs.h |  1 +
>  4 files changed, 88 insertions(+), 48 deletions(-)
> 

-- 
Jeff Layton <jlayton@xxxxxxxxxx>




[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