Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp423072pxk; Thu, 17 Sep 2020 06:47:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxW6vPHZ25TVWOh448/MYpHDf5mvUjDX4hy8ffdC3Xk3uZBokkBNgLAHbdQy60lSWGfUF8 X-Received: by 2002:a17:906:474f:: with SMTP id j15mr32676304ejs.468.1600350457292; Thu, 17 Sep 2020 06:47:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600350457; cv=none; d=google.com; s=arc-20160816; b=Xdl8qbYjzuVw7YAY08Af0t65pdA+JvlQibcWjAmbryZVW3bZt2m5WbvsE1i0ucuqce FQtwoa099vHEhmGzZVz2hX8v64pVxphUhdB6HO7lERyZ0Osmv/WLkzfnh4vHODwOclov ZpwC81t587Owx3u5UMq1oG4chPjx7Ip6FGJHGTH4HG06huwt2tPozaxbYWIZMDr8wocA w+z0QWF6N3V0YLvLV1NfofuFkt9fpBT6kJV2CDpFDPCx6XJJg6HfIdrFHuguA7/ZNLDe yNpaf3AKJoNejFz6y92zjYaLE45TAQKH4wqLoExoginsJaft/uXpron/hQH5kn9XtKTI LVsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=vAZ7GYrpBa5ucLCP/AOwHIdySIKLL/ta6t+Gc/7xpW4=; b=rAFYXymDXz7oF/chTrAqzzf2PjqqMe/CglYlpRld9DepXinf3b2Sq9jorAqb2Ol6e0 kWGpkmW6CGMWayS4kfjz5kuJIh/MYPqwqsWej3Vf9qU00pUN9WWpdU+SfuQWVmxFwQer qDX0RjgG0z7JD07jG/2AP4OMr7y7l6wY8NW4VGH05lhBS+6ZORvu9dwzkIj7DF++82B0 Q6vz3RRdm0DXn4UHYupLx5H6q5xSczfBDFixLeGgEi7k70VX5TY65H1K9N9ySuFIEo3i DuFfGtHE6j85k06kh9S1FWSlaazIQsXBWONItnKMi2WSzPM6SfOotBaAiQq/Rx7CArja SbfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=f7+EgQ4J; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v26si13759795eja.287.2020.09.17.06.47.12; Thu, 17 Sep 2020 06:47:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=f7+EgQ4J; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727046AbgIQNlU (ORCPT + 99 others); Thu, 17 Sep 2020 09:41:20 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:41767 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727015AbgIQNez (ORCPT ); Thu, 17 Sep 2020 09:34:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600349661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=vAZ7GYrpBa5ucLCP/AOwHIdySIKLL/ta6t+Gc/7xpW4=; b=f7+EgQ4J2PhaDA1G2yv/CQgQiIF96kLEhMy+1DQOzBB3lELkCTkWpRZkUZ6UlltZatQtNk Sdoe/TtObHFzAqRkewM523OOIklUXQJBUbmLd823JfciOfBtxfJQ/zPpFUzl9LL0w7KNaw GWUL+GJ/bi1p1dicmxRxdq02NNXaeyo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-238-2Aq0qTI6MbitNKLSTYgyNw-1; Thu, 17 Sep 2020 09:34:17 -0400 X-MC-Unique: 2Aq0qTI6MbitNKLSTYgyNw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B9A05ACE37; Thu, 17 Sep 2020 13:34:15 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.40.192.159]) by smtp.corp.redhat.com (Postfix) with SMTP id D2FF45DEBB; Thu, 17 Sep 2020 13:34:12 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Thu, 17 Sep 2020 15:34:15 +0200 (CEST) Date: Thu, 17 Sep 2020 15:34:11 +0200 From: Oleg Nesterov To: Matthew Wilcox Cc: Boaz Harrosh , Hou Tao , peterz@infradead.org, Ingo Molnar , Will Deacon , Dennis Zhou , Tejun Heo , Christoph Lameter , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Jan Kara Subject: Re: [RFC PATCH] locking/percpu-rwsem: use this_cpu_{inc|dec}() for read_count Message-ID: <20200917133411.GB5602@redhat.com> References: <20200915140750.137881-1-houtao1@huawei.com> <20200915150610.GC2674@hirez.programming.kicks-ass.net> <20200915153113.GA6881@redhat.com> <20200915155150.GD2674@hirez.programming.kicks-ass.net> <20200915160344.GH35926@hirez.programming.kicks-ass.net> <20200917120132.GA5602@redhat.com> <20200917124838.GT5449@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200917124838.GT5449@casper.infradead.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/17, Matthew Wilcox wrote: > > On Thu, Sep 17, 2020 at 02:01:33PM +0200, Oleg Nesterov wrote: > > IIUC, file_end_write() was never IRQ safe (at least if !CONFIG_SMP), even > > before 8129ed2964 ("change sb_writers to use percpu_rw_semaphore"), but this > > doesn't matter... > > > > Perhaps we can change aio.c, io_uring.c and fs/overlayfs/file.c to avoid > > file_end_write() in IRQ context, but I am not sure it's worth the trouble. > > If we change bio_endio to invoke the ->bi_end_io callbacks in softirq Not sure I understand... How can this help? irq_exit() can invoke_softirq() -> __do_softirq() ? Oleg.