Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1844633pxm; Fri, 4 Mar 2022 04:50:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJy27vpau2/czdprrjIdGYJUvUAfUqcSnXFCzN9gZYtVNQs4H8QnsgcYfjyyHxPAScmd3ct4 X-Received: by 2002:a05:6402:2298:b0:410:a419:997 with SMTP id cw24-20020a056402229800b00410a4190997mr38861105edb.271.1646398242765; Fri, 04 Mar 2022 04:50:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646398242; cv=none; d=google.com; s=arc-20160816; b=Xbr/jkEhCtDePuFGwgRtN7Ux6+U22AZVSmJjPPg/D+UJTrS8Or01D9qzfC/Md/DMak gfisjBVBR55yWbQhsSK8JkBU5liOexMPl4UYcnBp+iok503aRnsAjgZL88jnK9MXh+rx 3ID9pZuBn9BS+jPHYXN3E49d6c1AioOA18TwroZXonHMgtka/AcORseGAr0tKbLorMwD Bclg3vG4wdM8EzVjYEWzZ6LyGEeNdQfCCnMsDg5TBdckvFLg4nbOkJ7zzCjujtEX1RHQ 1SSxpYxlNsp2AAgJIDpBYMyqHHG2qJ9Y276Vcm4cQSB7KOa9lQ/z7/hXURf1xLv4mOlH frTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=0GYenn+rgMznVgcu77L9eTvFUbKZ98vSsnayTEi/3mg=; b=xHSRCIBqtJ480rX2koeuGSQOzSFcrDlERSl8dvsO9A7MED0lICeHSkVoKadRnJyGOv D7pdyXHsuz3OfjyzgvTMO26k0rGqjHrF6r2bWJ4PcgzQd/wrc8UvWoJF3eAV6uu0jctp Bc+9ICgyE5zFBp87Q2GzCRHPnal+p8icBZOff5vYai3fFk4gQZgHV5isAt1YF/0NqB0S MtYq6qLWCZ+VxZ5RntEeuI46XpfGmJAXIJ3dwur7M6IIMdJBUhZBK7GW1hqNEB8TdEve jG6HCDYPyuNYLprpUrFnkJIQ3dkwZel9W9rPrkeX9z/+lvnTJZDYzqZFpMgXNxjGsmNF 5ixg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=zDewUWU4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e26-20020a170906315a00b006cf60c8c029si2828467eje.340.2022.03.04.04.50.19; Fri, 04 Mar 2022 04:50:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=zDewUWU4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231624AbiCDMS0 (ORCPT + 99 others); Fri, 4 Mar 2022 07:18:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229600AbiCDMSX (ORCPT ); Fri, 4 Mar 2022 07:18:23 -0500 Received: from mail-yw1-x1133.google.com (mail-yw1-x1133.google.com [IPv6:2607:f8b0:4864:20::1133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 704B922B2C for ; Fri, 4 Mar 2022 04:17:34 -0800 (PST) Received: by mail-yw1-x1133.google.com with SMTP id 00721157ae682-2dbd8777564so89530197b3.0 for ; Fri, 04 Mar 2022 04:17:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0GYenn+rgMznVgcu77L9eTvFUbKZ98vSsnayTEi/3mg=; b=zDewUWU4/9EvtfgumVR2lIuAPqJGxbcH3EorBfbMS4fIwHrlv1lpQPKZSYFHj8lSX/ ywTuR3j24MGPFD1AoQuMKPsM+5bGRyxYbGEc/rOko2iF5FdROeiCj4ZT2sdZhIK89TQN My34qhOBFqgYJts0PV5FlBt1LvNCEe5fSlskyZ6Zq8Wq+oaHBxM2H3pOUBYCeaBP8bdo FUDPeXJu++62THA8/Cg6iaZWelLWi0LXvY6u70yQEMq7mWJKFwdB+fD007aOS1NfkUBb rLsvFqBWgL7bbvtAwjTfMBHHlq91KB4oozt5++aRfJeg3fFRnKGcD3v10TWDxPDxEMxF P5FQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0GYenn+rgMznVgcu77L9eTvFUbKZ98vSsnayTEi/3mg=; b=E7GVz9Ckdi5tUqMEz5wmsMVyZ92INpXzgHnpUQ+cypOPBRt558jGXesBZh6utiB37e aOtFjWQ9Gy9tavy+QKIPP4c8SYsRt2veFhSRIfCGaG+QbFWs1c0BQn1gEro7J81NgVQN LQsM5H031RyjUigt82JhGGXXlYARP5bRBZoyf/K4rn/RhvfWsNIQzcLjtr7oGS9FNMNR /k+H4iZ1DSfJpjRs9QOrlXR9avUU/Mfz7CV7oX+uaaTJabQsFu2kzhALsi+7uaWNUFn+ aPLoogP7g905fJTgfdylOyGIbWLnLfyJjgu+if7oeOcMJqfSI+fvaF/Y1jRfFDJJAq9Q xcPg== X-Gm-Message-State: AOAM530EnAyX6w6fbEkttCr/QcZljpazPLCAEFCe3eqjofQFhBQLuVT5 McKl6dREOKQlJDDbKkQT9MkYVUrr3SYce7EU4fb33Q== X-Received: by 2002:a0d:f9c5:0:b0:2db:7a9a:b01a with SMTP id j188-20020a0df9c5000000b002db7a9ab01amr24767075ywf.458.1646396253728; Fri, 04 Mar 2022 04:17:33 -0800 (PST) MIME-Version: 1.0 References: <20220304093409.25829-1-linmiaohe@huawei.com> <20220304093409.25829-5-linmiaohe@huawei.com> In-Reply-To: <20220304093409.25829-5-linmiaohe@huawei.com> From: Muchun Song Date: Fri, 4 Mar 2022 20:16:46 +0800 Message-ID: Subject: Re: [PATCH 04/16] mm/migration: reduce the rcu lock duration To: Miaohe Lin Cc: Andrew Morton , Mike Kravetz , Yang Shi , Matthew Wilcox , Huang Ying , Zi Yan , Minchan Kim , Alistair Popple , ave.hansen@linux.intel.com, o451686892@gmail.com, Mina Almasry , John Hubbard , Ralph Campbell , Peter Xu , =?UTF-8?B?SE9SSUdVQ0hJIE5BT1lBKOWggOWPoyDnm7TkuZ8p?= , Michal Hocko , riel@redhat.com, Linux Memory Management List , LKML Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 4, 2022 at 5:35 PM 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. > > Signed-off-by: Miaohe Lin Also simple. Reviewed-by: Muchun Song