Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp464229pxk; Thu, 1 Oct 2020 06:50:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyO/6JGti4CRAZJBijOzVJPqTKu4eNR9UUAs5dvUDlsXYbU8N6QyOtravd+CG3yzIaDN55H X-Received: by 2002:a17:906:c2d2:: with SMTP id ch18mr8670867ejb.79.1601560231982; Thu, 01 Oct 2020 06:50:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601560231; cv=none; d=google.com; s=arc-20160816; b=w4r/b1nNaSbIdhPhcfiW58SlNsM+LvXDMJIRz4rNNHBMtCwSVxRsHBufO0OX3cTHS7 ZSvq6zLh103HISfR5mQwvfLa5+3g77KqeAOZL81TH9SGMspgsgOj6is6v6KaWaWkAXi0 x3djMEY5AcevDPGf8mxXUTJ9rJwVjAY96MsThuF4UBuWxxzmkvuVdcY9hLtxrBXqGLKA lpY4/Ou+wJuKMOQF3OaBovpsDbYWoNdRbFbOI2uCnNTcly8hlk5GYipXjUA7Qg63dunA Tzwm9QPB26ZuZv1pTQCfsP4p4uGw8tCsjGdNWbroAG4XpiESSUiIOzZ8ebM1UTrkwnN1 dzlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=J07dmbsk/hmgIpcYIkXh0p3U0uIy5v1p6RA5XO+CLeU=; b=lXUPsxK8gRR7bGBhSv+CEqK9ijsRIpzWx/braKd/LI1hoHv08tzO+p/NR/ftiYzEAg 2kNQ0uH8opKl7z623cZQ4gvrt34RX7RD00lRxXoj+g0bEtAUis2uM8a2w6vtxtvJV3p8 YB/jf+6tAzwvndYeR57Weqtkl7fEgT8JkyOxhzoLyl++u1fC9By/vWeWvFv1ferW0c5q fqZs584H3myNkgTQaQsS2xxLAYJVWkzVOG1n8LmuGB6nU7TtklJ1GjhWtes1o5XdDjv3 4xKQlPYuGK80VDWJ6tdY8Qo/TPa7kitBR9u81nOLvwYE2sX/O/R5gS+G/Pdmi4QEmBDx bdDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=WrP4qg+L; 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=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j17si3524934ejs.0.2020.10.01.06.50.09; Thu, 01 Oct 2020 06:50:31 -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=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=WrP4qg+L; 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=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732104AbgJANsX (ORCPT + 99 others); Thu, 1 Oct 2020 09:48:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732018AbgJANsW (ORCPT ); Thu, 1 Oct 2020 09:48:22 -0400 Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04063C0613D0 for ; Thu, 1 Oct 2020 06:48:21 -0700 (PDT) Received: by mail-qk1-x741.google.com with SMTP id q63so5304034qkf.3 for ; Thu, 01 Oct 2020 06:48:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=J07dmbsk/hmgIpcYIkXh0p3U0uIy5v1p6RA5XO+CLeU=; b=WrP4qg+LA4thd9MAXuQz83ACLMcWis6RLyd84dLnuZNL1otp+Rg/azur+Mzz3upQb2 7Xy2twk2EJhPGKnBbcFRXF5CnTmMXL6lg92Rni/yjOCzeIE1uhjQgvvKXc1OWe7pjHjj 5Jd/GTPZEFjHZlSwCz0np3Skui6Y9yOSslwPOjMyk/alFHiUHZwF0QGYtKQf/Aq94L8B sbmHHy30e6QYnVi8toHwwT+49zqbMsU5xNt6shfLCtbrCkWQFIYgGP9OsTHX/z5OPqPJ s869LMmBNRuxuJpUhq54myQGB1nrgHN/zZVqJuIVGw570zX9ULGRkGGG4csrGvdztKpg 3NAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=J07dmbsk/hmgIpcYIkXh0p3U0uIy5v1p6RA5XO+CLeU=; b=d33JAe5RhwZSJkue7AEZV88zYj9GfXtOSO22+wn7yFZMzPKIl2US8Tj9RrXQWreUZW luN4CV4j+bfTib4FF7cdAi4ZfsAzokXsuo49S1zUVqVBgB+1z/2+EnZPI7RrWXJKegAA s8d8MCt+WGnehhLNSgRBWJ8DYRr1N/TMONQJE3cfJfbIFJB9mHccqgONTC9gVnzQ+F9c ipwWL5mnNFMPyQYLEZm+DV54PbhkZgH7GXjE07JmWNPEtJkizrZjdcMn/x8iSI3k4ScX aqS5iwtRWXyNWdYhuYCOUPZJKFcs7Nmv7z4qlXuYjocehZDtOregAjDHL+b7Wic+Cw/N q7MA== X-Gm-Message-State: AOAM531uUz6MDyoQuN9m8XDQPgpH0yB12PtokvyXAVi8p3lHIZwJ1s+u 4zWPgemO/5xk3kglHtDCBrpVfg== X-Received: by 2002:a05:620a:526:: with SMTP id h6mr7650128qkh.25.1601560100278; Thu, 01 Oct 2020 06:48:20 -0700 (PDT) Received: from localhost ([2620:10d:c091:480::1:4e22]) by smtp.gmail.com with ESMTPSA id o4sm5837971qkj.22.2020.10.01.06.48.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Oct 2020 06:48:19 -0700 (PDT) Date: Thu, 1 Oct 2020 09:46:38 -0400 From: Johannes Weiner To: Roman Gushchin Cc: Andrew Morton , Shakeel Butt , Michal Hocko , linux-kernel@vger.kernel.org, linux-mm@kvack.org, kernel-team@fb.com Subject: Re: [PATCH v4 1/4] mm: memcontrol: use helpers to access page's memcg data Message-ID: <20201001134638.GE469663@cmpxchg.org> References: <20201001002710.748166-1-guro@fb.com> <20201001002710.748166-2-guro@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201001002710.748166-2-guro@fb.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 30, 2020 at 05:27:07PM -0700, Roman Gushchin wrote: > +/* > + * set_page_memcg - associate a page with a memory cgroup > + * @page: a pointer to the page struct > + * @memcg: a pointer to the memory cgroup > + * > + * Associates a page with a memory cgroup. > + */ > +static inline void set_page_memcg(struct page *page, struct mem_cgroup *memcg) > +{ > + VM_BUG_ON_PAGE(PageSlab(page), page); > + > + /* > + * Please, refer to page_memcg()'s description for the page and memcg > + * binding stability requirements. > + */ > + page->memcg_data = (unsigned long)memcg; > +} Please delete and inline this as per previous feedback, thanks.