From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E243C43387 for ; Tue, 15 Jan 2019 10:19:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 10BCA20656 for ; Tue, 15 Jan 2019 10:19:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727328AbfAOKTR (ORCPT ); Tue, 15 Jan 2019 05:19:17 -0500 Received: from relay.sw.ru ([185.231.240.75]:36276 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726077AbfAOKTR (ORCPT ); Tue, 15 Jan 2019 05:19:17 -0500 Received: from [172.16.25.169] (helo=localhost.localdomain) by relay.sw.ru with esmtp (Exim 4.91) (envelope-from ) id 1gjLoQ-00012Q-L3; Tue, 15 Jan 2019 13:19:14 +0300 Content-Transfer-Encoding: 7bit Subject: [PATCH 0/7] fuse: Improve disconnect scheme and avoid taking fpq->lock on hot paths From: Kirill Tkhai To: miklos@szeredi.hu, ktkhai@virtuozzo.com, linux-fsdevel@vger.kernel.org Date: Tue, 15 Jan 2019 13:19:13 +0300 Message-ID: <154754701031.4244.8089449938935364463.stgit@localhost.localdomain> User-Agent: StGit/0.18 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org There is no a reason to set individual FR_ABORTED state for every request, since fuse_abort_conn() aborts all unlocked requests at once. FR_ABORTED bit and fpq->io list just allow fuse_copy_aborted() to end some of requests, which are in the middle of fuse_dev_do_read() and fuse_dev_do_write(). But this is not a big deal, since these functions abort the requests themselves. This patchset introduces a better scheme for fuse_abort_conn(), which allows to remove excess flags and fpq->io, and optimizes hot paths fuse_dev_do_read() and fuse_dev_do_write() by avoiding taking fpq->lock there. --- Kirill Tkhai (7): fuse: Check for fc->connected in fuse_dev_alloc() fuse: Move flush_bg_queue() up in fuse_abort_conn() fuse: Drop and reacquire fc->lock in middle of fuse_abort_conn() fuse: Add fud pointer to struct fuse_copy_state fuse: Introduce generic fuse_copy_aborted() fuse: Kill unused FR_ABORTED, FR_LOCKED and FR_PRIVATE flags fuse: Kill fuse_pqueue::io list and avoid taking fpq->lock on hot paths fs/fuse/dev.c | 131 ++++++++++++++++-------------------------------------- fs/fuse/fuse_i.h | 20 ++------ fs/fuse/inode.c | 10 ++++ 3 files changed, 52 insertions(+), 109 deletions(-) -- Signed-off-by: Kirill Tkhai