Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1626755imu; Tue, 6 Nov 2018 01:31:11 -0800 (PST) X-Google-Smtp-Source: AJdET5dXxvM6Iemi+bh4IBs/jHVuhCdXOHghkKH2PTaMZOjLUCUq0p2E3tIWjxttRcBRKVx63iyc X-Received: by 2002:a17:902:263:: with SMTP id 90-v6mr25432606plc.190.1541496671738; Tue, 06 Nov 2018 01:31:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541496671; cv=none; d=google.com; s=arc-20160816; b=uAQFMMLh4/lI2GbWgAujdlSpF0gZ2tXdRnMXoU/H8O2+mftvbnCsegsQlfl0i3emIG GVVEfr33cjZBxpAg8LL3YPnjEgWlqr5a0dle/gbNfkhl3KIaVG07Zuo7x5vXXbWBa9nE Ef1EQpfuLQGAYC6nsa+RRv47/c8xrhC1AmSzqrEEn0pIahrft/JabsYIiToagRhNWxQj qptKRi1r17j083Y/ELcnsupuFsHcefv+BUWsXpsbWdxcswbC/W1cO6ia/G5i+3Czuon3 G2aEOUZvYF3WTf/4byq4BZGvWmV2hdziP1K5jZRzipMEge4r6nqwF3+owv4KOLoaMFwX aGWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id:date :to:from:subject:content-transfer-encoding; bh=Ojf/bBL12hG3CyFQNGFunJhIHszDmkrD6KyLU8ei1Bk=; b=YdFuufCcCbJSUaT9x0GFxoYkvCMo4NptRlcfuNyCyzQecTEFDV+39/W5mT1mExVAYp slNM5/542F+6SWNciY8IkIDl0ib/OoKtfUpY942Nhc2TAs1k1msP+nJnbl7T8H8XrWQ1 h6UCW1rEKS38KxKr7DbRvM/NSySsMV02cyB7R3qjB1oAmuxyNpPJ6ojUMuxRYcwke14r P+ZHDeK3rJjUeLLfkLLyrakVyutbqBm+jU1kTsAU8LtpjRty6CdEjsucOkcKqlroawkb 4HYf78qzw/E6QEUt9IMtsvq4Jln+9OJ6dvoKRN0RGuVl9VhGpx8I9ruLkTQT7BeyDtsL d/gw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z189-v6si48976346pfz.32.2018.11.06.01.30.55; Tue, 06 Nov 2018 01:31:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729989AbeKFSyu (ORCPT + 99 others); Tue, 6 Nov 2018 13:54:50 -0500 Received: from relay.sw.ru ([185.231.240.75]:59138 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729430AbeKFSyt (ORCPT ); Tue, 6 Nov 2018 13:54:49 -0500 Received: from [172.16.25.169] (helo=localhost.localdomain) by relay.sw.ru with esmtp (Exim 4.90_1) (envelope-from ) id 1gJxgq-0002vb-41; Tue, 06 Nov 2018 12:30:28 +0300 Content-Transfer-Encoding: 7bit Subject: [PATCH 0/6] fuse: Interrupt-related optimizations and improvements From: Kirill Tkhai To: miklos@szeredi.hu, ktkhai@virtuozzo.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 06 Nov 2018 12:30:27 +0300 Message-ID: <154149586524.17764.5252013294539109287.stgit@localhost.localdomain> User-Agent: StGit/0.18 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset consists of several parts. Patches [1-2] optimize likely case of request_end(), and make this function to take fiq->waitq.lock only, when it is really needed. This improves performance of this function completes. Patch 3 makes request_end() to call wake_up() only for not background requests (background requests never wait answer), and this optimizes this function a bit more Patches [4-6] makes code to check userspace requests correct interrupt id to requeue (whether we've sent this interrupt). --- Kirill Tkhai (6): fuse: Kill fasync only if interrupt is queued in queue_interrupt() fuse: Optimize request_end() by not taking fiq->waitq.lock fuse: Wake up req->waitq of only not background requests in request_end() fuse: Check for FR_SENT bit in fuse_dev_do_write() fuse: Do some refactoring in fuse_dev_do_write() fuse: Verify userspace asks to requeue interrupt that we really sent fs/fuse/dev.c | 73 +++++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 53 insertions(+), 20 deletions(-) -- Signed-off-by: Kirill Tkhai