Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp2196175ybn; Thu, 26 Sep 2019 08:22:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqz2LaievKePt1zaA86KSccWYoMMYg/aJm+6T155MlVK84beo90ZDEj6d6xcABGD6gA4UBmW X-Received: by 2002:a05:6402:1355:: with SMTP id y21mr4257168edw.303.1569511324739; Thu, 26 Sep 2019 08:22:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569511324; cv=none; d=google.com; s=arc-20160816; b=GiAS9MtqUCLzJqwXpUmEubrbAwjR31of7MhTQxnkEGy9C1O5mmt15kITUxSU95VqW7 zXKSx75aLfR3la1jmDvA0wANo/lnZ5oGPk3uz/U2US642foj5vX3o8GLbov4Tyy2UlWS uFC5mOxYyzd7diT+Z1yEXJcQxVmBl9617ToEp0wkMtk22331EHbP8KXUklSYVyZ6WSSW mRSSCXRFkDeHvcZl5GTw3Ve6pdFvCpYdys1ZnIeAFOnPmDfIJbUT9HyocwjddCEoahgj pd6U1R8dgeqd69FELC5hW3OtohYkkDoCAiq7NwE2KM+Jcrkn+/oO7s8MwSU9RypR+tV8 h4Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject; bh=HFotGe95HLJfwkokoN/khRbJ8JvtfvSFbv98TWWG2uY=; b=Oc0sPb8PoQ/cjIAzpArzDAumYThrXFDPA047xMgukQgmTzIVbtHlfshDl89VMSFJBd vhpWv0s0wALBgqzy7N7+jK8TQtYYsZj0/a0Bq3kwDWv1DoL0Mfl/fRMiwIVN13r0dCUd 81H+BawOWBOQ8t4Ks8kvzq05QigDDZ7OV6XQ8rU16EwPRhepVxUNYaautnXCcsAGQ1KO uRp31qH4A3wGRJSZU3t1VjsFebTemVAJ7rwIDdfC9Y8Rk/2AqfMKs7WBf8pEoZSnuHVn M1GAFDjc/CegKz83+slmdXd91GWf6U5gurfDighRSJjpFBlkr9FB2dpneEFszQRzixdR fX9A== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y71si1664243ede.135.2019.09.26.08.21.40; Thu, 26 Sep 2019 08:22:04 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727296AbfIZPSm (ORCPT + 99 others); Thu, 26 Sep 2019 11:18:42 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:41061 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726030AbfIZPSm (ORCPT ); Thu, 26 Sep 2019 11:18:42 -0400 Received: by mail-pf1-f194.google.com with SMTP id q7so2017698pfh.8 for ; Thu, 26 Sep 2019 08:18:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=HFotGe95HLJfwkokoN/khRbJ8JvtfvSFbv98TWWG2uY=; b=fTT13j+HZvBMImjLuc8VyhRvbAejkrXM+LtKu1zULuIWrp4ZvboJz7/kpifHKCVdr1 FR6Iw1UkngxCfBFaVrtnTst769ZrXW6zRBwyw+h/vsGuMFx9plbG5tcn/ygLKCCBz+Nm 9WevNHrZPZxMDYK5wsM1/wI6cW6uLjVK9SNTXlGVS1Tqjoe7PsvIEFk8gVfIT9ZQwux8 bop51JxEoQ2FC5NxjH2F9lMxFFBZCxHBtc3delZnHTqoPaFiroR9/RQTA/ibVTxTH9Lo nEfctaIH9PVf2qS+7xudLdOTDML2dO8jP1HX26QBbp8de3tjOYIHQL82cPCQjjImdN6v t2GQ== X-Gm-Message-State: APjAAAW8K0b3fRk9G+/mxR8fkZCemDIaJeTzDYEnLo+twyyPcJ81X9Ay KjULYSS/xKvFDWzqBu8Vl+RQuRdWCG8= X-Received: by 2002:a63:590:: with SMTP id 138mr3882761pgf.78.1569511120829; Thu, 26 Sep 2019 08:18:40 -0700 (PDT) Received: from desktop-bart.svl.corp.google.com ([2620:15c:2cd:202:4308:52a3:24b6:2c60]) by smtp.gmail.com with ESMTPSA id a11sm3501075pfo.165.2019.09.26.08.18.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 26 Sep 2019 08:18:39 -0700 (PDT) Subject: Re: [PATCH] async: Let kfree() out of the critical area of the lock To: dsterba@suse.cz, Yunfeng Ye , bhelgaas@google.com, "tglx@linutronix.de" , Alexander Duyck , sakari.ailus@linux.intel.com, "gregkh@linuxfoundation.org" , David Sterba , "linux-kernel@vger.kernel.org" References: <216356b1-38c1-8477-c4e8-03f497dd6ac8@huawei.com> <20190926110648.GM2751@suse.cz> From: Bart Van Assche Message-ID: Date: Thu, 26 Sep 2019 08:18:38 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190926110648.GM2751@suse.cz> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/26/19 4:06 AM, David Sterba wrote: > On Thu, Sep 26, 2019 at 03:58:36PM +0800, Yunfeng Ye wrote: >> The async_lock is big global lock, I think it's good to put kfree() outside >> to keep the critical area as short as possible. > > Agreed, kfree is not always cheap. We had patches in btrfs moving kfree > out of critical section(s) after causing softlockups due to increased lock > contention. The above would be a great addition for the commit description. Anyway: Reviewed-by: Bart Van Assche