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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B11EDC433EF for ; Mon, 11 Apr 2022 14:10:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346951AbiDKOMZ (ORCPT ); Mon, 11 Apr 2022 10:12:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232426AbiDKOMW (ORCPT ); Mon, 11 Apr 2022 10:12:22 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63BDFA1A8 for ; Mon, 11 Apr 2022 07:10:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=pE/+SrYqL1g08VsHJNSz74TfceZwdGwwEWicZS/GD8M=; b=ZLfrUuTdHdrXz4S9W6SMCyeWxq 3wxcSW1LUfl16020ojYqUSj3OWn/iVNr3GkzrEGJ52Xqbvjm3asVm3jt5OMYefPr7npqxNYaPwoMw 4aEXNZB/WgMnToizp2YXhvsbRUW5C69PqTqdpR5ZJpn8fXmeXY4X4qcuE3KXmMCTD1a0ymNqu5TDV cvvy1sK0UL/ddGVNvzi5YZvfoUSYoV0avqYtfHnB+RAQXXrmxJHVtNEfITpQt9vB34xzXy+VuC1zz 8oc7R/+PBrZ3VmkCm7Ohdu8zalIIICu1dLlPcLrhCyXynJLMIC/5gBZAAs5XIxi03SexodoieLmK/ LdpuUJ1w==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndujX-009JBp-KC; Mon, 11 Apr 2022 14:09:35 +0000 Date: Mon, 11 Apr 2022 07:09:35 -0700 From: Christoph Hellwig To: Miaohe Lin Cc: akpm@linux-foundation.org, mike.kravetz@oracle.com, shy828301@gmail.com, willy@infradead.org, ying.huang@intel.com, ziy@nvidia.com, minchan@kernel.org, apopple@nvidia.com, dave.hansen@linux.intel.com, o451686892@gmail.com, jhubbard@nvidia.com, peterx@redhat.com, naoya.horiguchi@nec.com, mhocko@suse.com, riel@redhat.com, osalvador@suse.de, david@redhat.com, sfr@canb.auug.org.au, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/4] mm/migration: reduce the rcu lock duration Message-ID: References: <20220409073846.22286-1-linmiaohe@huawei.com> <20220409073846.22286-2-linmiaohe@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220409073846.22286-2-linmiaohe@huawei.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 09, 2022 at 03:38:43PM +0800, Miaohe Lin wrote: > rcu_read_lock is required by grabbing the task refcount but it's not > needed for ptrace_may_access. So we could release the rcu lock after > task refcount is successfully grabbed to reduce the rcu holding time. > > Reviewed-by: Muchun Song > Signed-off-by: Miaohe Lin Looks good: Reviewed-by: Christoph Hellwig