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 X-Spam-Level: X-Spam-Status: No, score=-18.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C002C433DB for ; Mon, 8 Mar 2021 06:54:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C65BE651F7 for ; Mon, 8 Mar 2021 06:54:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235071AbhCHGxf (ORCPT ); Mon, 8 Mar 2021 01:53:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235024AbhCHGxK (ORCPT ); Mon, 8 Mar 2021 01:53:10 -0500 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FC00C06175F for ; Sun, 7 Mar 2021 22:53:10 -0800 (PST) Received: by mail-lf1-x131.google.com with SMTP id m22so19283579lfg.5 for ; Sun, 07 Mar 2021 22:53:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RUf6YK7Pbg6+iTFisLTzXO2HwYinFRUhW6KJnLMuDNI=; b=etm3nnK8bmOjgvI5OvVHNEA7tyQCpVhusqJ9ueTJDqFj67gFouUocXIOhoLsqsexbp o6zKAFNH3D5OyJzUeQwQ57ZFx1Ma+ry6AkUfU6cvIU2MXLTetatj1RzR1jRyPvoylo3C 979bbQfrp+sFg3W+65aqRy3RPeeJ9lBoDBNpuqLxnJRUpQIyFrqS3EnTtvAHl9HxZwtR HKr5MLjPBIsVcIJfpNqK97Gi3oC/3hAEcvHC26M05Bep5dypC3m/z2vILyFUHA/Dnme8 ioqlgDGCc3Y0dG/aSAGVDvGwkvfTLoHouvnJNX+TZql1llm9a9+b/MYjDlI7Yc5po/5u SI+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RUf6YK7Pbg6+iTFisLTzXO2HwYinFRUhW6KJnLMuDNI=; b=D2ZBvy6hmN0qmYDOrPcI5Pq4g0ZM9PxOCMFFa1fTBQk6Gr8icL6xt6QRYXFa4Efll8 dsOz/XPHsj4fbv4U1/pyLbhKXXwFP86sJJINe4Wh8PJ29lOyzQeTJsvDzxZp/JD6iv1N wLDvDgVWDG9Ac2unaCM62qvFoIB3lxYPlzjxWpHnDH5jajahOWT+bYLbkJEMwumXTlR1 ZGwwl74zH2Y9k4cXtBTgu4xeAc2UlLM5Uj7ydi7MoILON/Ien6SMOsH8d4W4sH+HSfHf xiD3E5BdRt7OazMSJSqjZerta3BcSklVgW2FKS2DvA4o59jRF7dpTCEMPBP5D5l6nQKz RqBw== X-Gm-Message-State: AOAM5312qFVg/YquS6KwiDtSBAOybqqmGylYF3sFybNBhii5DTqGBVSL QsPTyGTURh9QLbj3KaIfqdesS+st/j9mOAryRgGiRA== X-Google-Smtp-Source: ABdhPJxh1vhheABhPdE+eMg+f0jzVW0I+FN3Q3w1WzPUi+TIbBt6qGQ/qDRwNmbeyQuENp0Pt99oemM5cn/gipQmNiM= X-Received: by 2002:a19:3804:: with SMTP id f4mr6053417lfa.117.1615186388282; Sun, 07 Mar 2021 22:53:08 -0800 (PST) MIME-Version: 1.0 References: <20210217001322.2226796-1-shy828301@gmail.com> <20210217001322.2226796-8-shy828301@gmail.com> In-Reply-To: <20210217001322.2226796-8-shy828301@gmail.com> From: Shakeel Butt Date: Sun, 7 Mar 2021 22:52:54 -0800 Message-ID: Subject: Re: [v8 PATCH 07/13] mm: vmscan: add shrinker_info_protected() helper To: Yang Shi Cc: Roman Gushchin , Kirill Tkhai , Vlastimil Babka , Dave Chinner , Johannes Weiner , Michal Hocko , Andrew Morton , Linux MM , linux-fsdevel , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 16, 2021 at 4:13 PM Yang Shi wrote: > > The shrinker_info is dereferenced in a couple of places via rcu_dereference_protected > with different calling conventions, for example, using mem_cgroup_nodeinfo helper > or dereferencing memcg->nodeinfo[nid]->shrinker_info. And the later patch > will add more dereference places. > > So extract the dereference into a helper to make the code more readable. No > functional change. > > Acked-by: Roman Gushchin > Acked-by: Kirill Tkhai > Acked-by: Vlastimil Babka > Signed-off-by: Yang Shi Reviewed-by: Shakeel Butt 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 X-Spam-Level: X-Spam-Status: No, score=-18.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B22E8C433DB for ; Mon, 8 Mar 2021 06:53:11 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4D80B651F6 for ; Mon, 8 Mar 2021 06:53:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4D80B651F6 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CFFF66B00A2; Mon, 8 Mar 2021 01:53:10 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CAFD76B00A3; Mon, 8 Mar 2021 01:53:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B50768D000A; Mon, 8 Mar 2021 01:53:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0214.hostedemail.com [216.40.44.214]) by kanga.kvack.org (Postfix) with ESMTP id 967416B00A2 for ; Mon, 8 Mar 2021 01:53:10 -0500 (EST) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 496F0181B049E for ; Mon, 8 Mar 2021 06:53:10 +0000 (UTC) X-FDA: 77895790140.06.10CF384 Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) by imf29.hostedemail.com (Postfix) with ESMTP id D9EAEE4 for ; Mon, 8 Mar 2021 06:53:07 +0000 (UTC) Received: by mail-lf1-f48.google.com with SMTP id k9so19259570lfo.12 for ; Sun, 07 Mar 2021 22:53:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RUf6YK7Pbg6+iTFisLTzXO2HwYinFRUhW6KJnLMuDNI=; b=etm3nnK8bmOjgvI5OvVHNEA7tyQCpVhusqJ9ueTJDqFj67gFouUocXIOhoLsqsexbp o6zKAFNH3D5OyJzUeQwQ57ZFx1Ma+ry6AkUfU6cvIU2MXLTetatj1RzR1jRyPvoylo3C 979bbQfrp+sFg3W+65aqRy3RPeeJ9lBoDBNpuqLxnJRUpQIyFrqS3EnTtvAHl9HxZwtR HKr5MLjPBIsVcIJfpNqK97Gi3oC/3hAEcvHC26M05Bep5dypC3m/z2vILyFUHA/Dnme8 ioqlgDGCc3Y0dG/aSAGVDvGwkvfTLoHouvnJNX+TZql1llm9a9+b/MYjDlI7Yc5po/5u SI+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RUf6YK7Pbg6+iTFisLTzXO2HwYinFRUhW6KJnLMuDNI=; b=Vma2YUNTiVwdUgm4hFHDtmuk0Kf3wJRjBvxW4TWFmKapITZ/8s0Eo6/uO7du4hjFAV syskaal4Zg9ySVq5sx9cEm+YggBCprWKyYUyXHRwvfZrecUGeEperKf/2p9oSeJ2wE0l 85/y7++8KdESHMcz21RRx5wtw+Yg4WejnHwpzdmCVvCSsfffranfRjhg2VWNrPXfSuHG IbdDpcgAEQxj5M/u7rD+aJn1z+6j3qqHp/A0iCMl8Lj1l7Ij8OYWPWp0JQYN58+sNyIS poXVeLLkyKabTYJzAqj4kW45vMulJCuAXELSPTBFakinHdMjQ99GIdwAhCBmNOzufJGg qlVw== X-Gm-Message-State: AOAM530zDeQToV7XJtJKebIRBk1RmDuxgJN0vsuzIjLugpKpJ4lNOV+5 qXFbwwxOOSjVv6I7VPSuqQTlc2pK6y0SxQ55RJGiuQ== X-Google-Smtp-Source: ABdhPJxh1vhheABhPdE+eMg+f0jzVW0I+FN3Q3w1WzPUi+TIbBt6qGQ/qDRwNmbeyQuENp0Pt99oemM5cn/gipQmNiM= X-Received: by 2002:a19:3804:: with SMTP id f4mr6053417lfa.117.1615186388282; Sun, 07 Mar 2021 22:53:08 -0800 (PST) MIME-Version: 1.0 References: <20210217001322.2226796-1-shy828301@gmail.com> <20210217001322.2226796-8-shy828301@gmail.com> In-Reply-To: <20210217001322.2226796-8-shy828301@gmail.com> From: Shakeel Butt Date: Sun, 7 Mar 2021 22:52:54 -0800 Message-ID: Subject: Re: [v8 PATCH 07/13] mm: vmscan: add shrinker_info_protected() helper To: Yang Shi Cc: Roman Gushchin , Kirill Tkhai , Vlastimil Babka , Dave Chinner , Johannes Weiner , Michal Hocko , Andrew Morton , Linux MM , linux-fsdevel , LKML Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: D9EAEE4 X-Stat-Signature: ikns6pyr74mpfmxojozjk83rz4gf63ea Received-SPF: none (google.com>: No applicable sender policy available) receiver=imf29; identity=mailfrom; envelope-from=""; helo=mail-lf1-f48.google.com; client-ip=209.85.167.48 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1615186387-701183 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Feb 16, 2021 at 4:13 PM Yang Shi wrote: > > The shrinker_info is dereferenced in a couple of places via rcu_dereference_protected > with different calling conventions, for example, using mem_cgroup_nodeinfo helper > or dereferencing memcg->nodeinfo[nid]->shrinker_info. And the later patch > will add more dereference places. > > So extract the dereference into a helper to make the code more readable. No > functional change. > > Acked-by: Roman Gushchin > Acked-by: Kirill Tkhai > Acked-by: Vlastimil Babka > Signed-off-by: Yang Shi Reviewed-by: Shakeel Butt