Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp612670pxk; Thu, 1 Oct 2020 10:02:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxHxZSRMtU+TYpTD5i44JRpY7v/uThLSgZmTW5k/BfG8rN0s8aM4YtXfyh+Cpq8q8qQtXRA X-Received: by 2002:a17:906:7113:: with SMTP id x19mr2706741ejj.59.1601571763588; Thu, 01 Oct 2020 10:02:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601571763; cv=none; d=google.com; s=arc-20160816; b=u0LcHkEJl7RMlK9b1wJZ7HIU2PsvDIWi4/rNE7R67AQEvKJzSwBme0bENLLibFxvTE GMxoQbV6qq2bQ1YKbGhtt6SVfhvEc4gWPoRHdaR0T6Yc7duFlc8XKhlgt3fxsYek1dJD trLdEZJX92UmMxvZkjSGrTur5PfCcZAhdGhwtQne3xIGc4F9hw96MqUugJwBLO/yt6fX lSwIhLsLTHqn0C2hzG31lO5O1OAEdZxIYFfhQ31MgHxnFV54NhfECbxoyIsGnxhr6LYF EgQpXzupT1goCmO2qVLGCfmpuxbYEh76MoSt0YacaG6UZEs0N8bCJU1Q+kndiyQIKLJU KU+A== 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=FBxjpUPAONJ+XqUQuZPU/FmGyoPMABIG8dYwepWTg9o=; b=PRV4l6lsoy5dC7lREUL9ni3nRJ3R3RShSJMHP+q1345SA652qH7VpNQhWzz0Jp2nRJ NjnQIeuNjZSmv4HEL2tEsgHqF8fQUiUIk+fLYeiFEQzcNTB6nMmJeG6eG1RXJTl8Ne6r 3SP5JPAMzEtVR6cy0K7k0nKkUoGYEGxP5R9IRfrh7SI60r8YpuSD3mxr4IcDTpF63lam ovGsuLEi7O/ON4kGcyYw9nDSnn5bgbnUCa4l8nFa0sYkOPn/NSqEUNNJes0dGFDdbldo R6kQf8ZIt/2MLuDQr+L8Wcrp7bS3MXYE7NLaS8G1v0BKJHmp749x3dyMBiJxoYpq7k8o DpwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=nhlNWx9W; 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=pass (p=NONE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c17si4114384ejx.205.2020.10.01.10.02.15; Thu, 01 Oct 2020 10:02:43 -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=@suse.com header.s=susede1 header.b=nhlNWx9W; 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=pass (p=NONE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732721AbgJARAo (ORCPT + 99 others); Thu, 1 Oct 2020 13:00:44 -0400 Received: from mx2.suse.de ([195.135.220.15]:37986 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732213AbgJARAo (ORCPT ); Thu, 1 Oct 2020 13:00:44 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1601571642; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FBxjpUPAONJ+XqUQuZPU/FmGyoPMABIG8dYwepWTg9o=; b=nhlNWx9WKyL/R8ePbdgLs+VJsvxFk3kt2QqgvZxDohm1sNNcQukYleQjt8TxHMeHWc+KG4 Bpi0vvxmAB/rl2mmaVD2UwnbgRwMogFFKIU5CnqlDsIIRnpV/O/OjQGzd/rXf+d+3gZNmE d4L3k7kbRYqNo3CclC3b/kt+poFTwFA= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id C78D4ADBB; Thu, 1 Oct 2020 17:00:42 +0000 (UTC) Date: Thu, 1 Oct 2020 19:00:36 +0200 From: Michal =?iso-8859-1?Q?Koutn=FD?= To: Roman Gushchin Cc: Andrew Morton , Shakeel Butt , Johannes Weiner , Michal Hocko , linux-kernel@vger.kernel.org, linux-mm@kvack.org, kernel-team@fb.com Subject: Re: [PATCH v4 4/4] mm: convert page kmemcg type to a page memcg flag Message-ID: <20201001170036.GA29848@blackbook> References: <20201001002710.748166-1-guro@fb.com> <20201001002710.748166-5-guro@fb.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="zYM0uCDKw75PZbzx" Content-Disposition: inline In-Reply-To: <20201001002710.748166-5-guro@fb.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --zYM0uCDKw75PZbzx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi. On Wed, Sep 30, 2020 at 05:27:10PM -0700, Roman Gushchin wrote: > @@ -369,8 +371,12 @@ enum page_memcg_data_flags { > */ > static inline struct mem_cgroup *page_memcg(struct page *page) > { > + unsigned long memcg_data = page->memcg_data; > + > VM_BUG_ON_PAGE(PageSlab(page), page); > - return (struct mem_cgroup *)page->memcg_data; > + VM_BUG_ON_PAGE(memcg_data & MEMCG_DATA_OBJCGS, page); > + > + return (struct mem_cgroup *)(memcg_data & ~MEMCG_DATA_FLAGS_MASK); > } Shouldn't this change go also into page_memcg_rcu()? (I don't think the current single user (workingset_activation() would pass a non-slab kernel page but for consistency sake.) Alternatively, I'm thinking why (in its single use) is there page_memcg_rcu() a separate function to page_memcg() (cross memcg page migration?). Regards, Michal --zYM0uCDKw75PZbzx Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEEoQaUCWq8F2Id1tNia1+riC5qSgFAl92CywACgkQia1+riC5 qSiqEA//SFQ/WkWbKkYPDQ+OghC6osKkFtrUsL47bJda7RmwZBt8HEdVQF80bilH FT6WJF9TiSW7ezR3Gj6KrmHBKvy8vYOOiTRLv4qQG/ThSpGdrxlT7L9u1BMrWW0c 3aCNmHUGCpUU03dMaa9H8KfhPY6pRON/wz26at9xsGPgMkn0EBrzOA8WDBOxLhtS mVXj8wKPbX2UY8VewV6chYIlucx4joCnbw4xjbNcoW1+XJ6bglBWX0dS1dwz/hoV fLxdMdXlCs5fM53Xzqlv2BgHkV//l3oCUN2G8wi4EKSg+iit9mBRnYDPQ/pOXN7o uXWjxQBZMBxCt1Ct5avF3P/Af5CLhVbUPwsNItDlMTTZDoUV1/4drfH5uikMw4/k ORS9BkU2Bl1SFL6ivYtxFqSrEAbzzj2RuDyMBc6GnlvkNO8lva2wyCrPUuIFsDT9 W+88q8gNSq0B6MsiLfP6/cIqaesm/9lRIjEKmnRlD8x8B5lV/bMFa4C0wAOc6zyw yxxBD0b7cAVlRaBD/SADEzfEE+M9A36X/sgnl0LJSFKSozPgabUekUgoRSHkZLVw wfITwV7HvYux5uWXCeyIQI18iO45F9GDh/sArHiYCwQUVsri8QTNgJbn3dl4tNBu hE3nDTgseJJb6l0AFTepeiecNjTmvj0sT2vUSxHXjizC//zhVVI= =l/la -----END PGP SIGNATURE----- --zYM0uCDKw75PZbzx--