From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-eopbgr20125.outbound.protection.outlook.com ([40.107.2.125]:13140 "EHLO EUR02-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726920AbeH0TQQ (ORCPT ); Mon, 27 Aug 2018 15:16:16 -0400 Subject: [PATCH 0/6] Extract bg queue logic out fuse_conn::lock From: Kirill Tkhai To: miklos@szeredi.hu, ktkhai@virtuozzo.com, linux-fsdevel@vger.kernel.org Date: Mon, 27 Aug 2018 18:29:01 +0300 Message-ID: <153538208536.18303.10732945923322972743.stgit@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Hi, Miklos, the patchset makes background queue and background-related data be protected with new bg_lock. This allows async reads not take fc->lock in fuse_request_send_background(), and this gives performace-visible increase on out async read-write test (1.7-5 % better). See [6/6] for the test results. The new lock protects max_background, congestion_threshold, num_background, active_background, bg_queue and blocked fields. See [5/6] for the details. Patches [1-3/6] are preparations. I've already sent you two of them, and you said at least one is already applied, but since they are yet no in linux-next, I add them to make kbuild test robot happy. [4/6] is a fix of existing issue. I don't know whether stable needs this fix, so I don't send it in separate. Please, say if it's needed resend it in this way. The test results is for our proprietary vstorage fuse driver. Feel free to ask me, in case of you want the patchset to be tested on some other fuse driver and with some other test. Thanks, Kirill --- Kirill Tkhai (6): fuse: Use list_first_entry() in flush_bg_queue() fuse: Move clear_bit() up in request_end() fuse: Underline congestion_threshold and max_background may be read w/o fc->lock fuse: Lock fc->lock during changing num_background and congestion_threshold fs: Introduce fuse_conn::bg_lock fuse: Do not take fuse_conn::lock on fuse_request_send_background() fs/fuse/control.c | 34 ++++++++++++++++++++++++++-------- fs/fuse/dev.c | 42 +++++++++++++++++++++++++++--------------- fs/fuse/file.c | 2 +- fs/fuse/fuse_i.h | 11 +++++++++-- fs/fuse/inode.c | 4 ++++ 5 files changed, 67 insertions(+), 26 deletions(-) -- Signed-off-by: Kirill Tkhai