Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2727303ybi; Mon, 17 Jun 2019 09:36:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqzL0YWLxfQ+pCFggEPUKuxq6C7ibuOi6V9MbD/vB5HXCKAjP78ffp1AGhxUdryAqVrn6Bpi X-Received: by 2002:a17:902:e306:: with SMTP id cg6mr76676508plb.341.1560789417299; Mon, 17 Jun 2019 09:36:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560789417; cv=none; d=google.com; s=arc-20160816; b=m4X20uzCwOnWOKKmDS+SrbEitIzjaPYrVoza0S+VLhaBZDKM4+N9c7F5AO/scChQex kLMs2fLwQoSGd9nF5irRUodeZPzzoBqwFBi+VwmjJxfUf6Gc3g3X/yjNtj0FaRcR3g4K 3zlnLqcOLWO9yxaU3uIfnDnvvgEJX83Uxw5U4ciugUjOghQOQMwsnpgHPn5SIhZ5hB5R kJ1Nl5Gv2TeI5xmbiAtCBLBNI/oxL6RKe5Uc8S62hbStzk97Drv+bJCe7MDC0ONKyj+p +aARXPPux/0VgmOuzc0j2R9GvBeM7lhEmOEA5OExhOb4N+7IH9xBCnuscW5XP2fuQT6e QV4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Ixv+eGXKTowsQd4kSC6437PjWxMZSw4RTfDydACcbNY=; b=jSXzVP9aNp5Z8KO+uqWpDQAiueQG6yIUfwDS09XylEKE6AKbJtKN9twjTGnr6mmXSo b441yf46LmhqDAwDEjvrSyspVUm0wXX56TYKWzPEzlEesU4YfZYaZRakrTf1DZx01qIy XJ2v9hEFfmgaIpvBrf6xG1se4hkzulfrFSw5WpSCq0j2Q4aI3oediByT/eZF660rwlH+ xLqcreyEnp3PYV9CqPlhhLZtWsM0/70uD8ws+lCQlHJXtguxAjP5SqDP8HwttZ+xi6iP c+S+Dm2PPRL9Y5fAtKOO74vpmlOfJHR8RCx78QOT8oLF4Bo96XRjkRnNU7EJRZ6Mcy+h UmRQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 207si11349286pfu.258.2019.06.17.09.36.41; Mon, 17 Jun 2019 09:36:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726920AbfFQQgf (ORCPT + 99 others); Mon, 17 Jun 2019 12:36:35 -0400 Received: from foss.arm.com ([217.140.110.172]:55962 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725863AbfFQQgf (ORCPT ); Mon, 17 Jun 2019 12:36:35 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8A67528; Mon, 17 Jun 2019 09:36:34 -0700 (PDT) Received: from fuggles.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D6AFA3F718; Mon, 17 Jun 2019 09:36:32 -0700 (PDT) Date: Mon, 17 Jun 2019 17:36:30 +0100 From: Will Deacon To: Mike Rapoport Cc: Mark Rutland , Qian Cai , akpm@linux-foundation.org, Roman Gushchin , catalin.marinas@arm.com, linux-kernel@vger.kernel.org, mhocko@kernel.org, linux-mm@kvack.org, vdavydov.dev@gmail.com, hannes@cmpxchg.org, cgroups@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH -next] arm64/mm: fix a bogus GFP flag in pgd_alloc() Message-ID: <20190617163630.GH30800@fuggles.cambridge.arm.com> References: <1559656836-24940-1-git-send-email-cai@lca.pw> <20190604142338.GC24467@lakrids.cambridge.arm.com> <20190610114326.GF15979@fuggles.cambridge.arm.com> <1560187575.6132.70.camel@lca.pw> <20190611100348.GB26409@lakrids.cambridge.arm.com> <20190613121100.GB25164@rapoport-lnx> <20190617151252.GF16810@rapoport-lnx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190617151252.GF16810@rapoport-lnx> User-Agent: Mutt/1.11.1+86 (6f28e57d73f2) () Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mike, On Mon, Jun 17, 2019 at 06:12:52PM +0300, Mike Rapoport wrote: > Andrew, can you please add the patch below as an incremental fix? > > With this the arm64::pgd_alloc() should be in the right shape. > > > From 1c1ef0bc04c655689c6c527bd03b140251399d87 Mon Sep 17 00:00:00 2001 > From: Mike Rapoport > Date: Mon, 17 Jun 2019 17:37:43 +0300 > Subject: [PATCH] arm64/mm: don't initialize pgd_cache twice > > When PGD_SIZE != PAGE_SIZE, arm64 uses kmem_cache for allocation of PGD > memory. That cache was initialized twice: first through > pgtable_cache_init() alias and then as an override for weak > pgd_cache_init(). > > After enabling accounting for the PGD memory, this created a confusion for > memcg and slub sysfs code which resulted in the following errors: > > [ 90.608597] kobject_add_internal failed for pgd_cache(13:init.scope) (error: -2 parent: cgroup) > [ 90.678007] kobject_add_internal failed for pgd_cache(13:init.scope) (error: -2 parent: cgroup) > [ 90.713260] kobject_add_internal failed for pgd_cache(21:systemd-tmpfiles-setup.service) (error: -2 parent: cgroup) > > Removing the alias from pgtable_cache_init() and keeping the only pgd_cache > initialization in pgd_cache_init() resolves the problem and allows > accounting of PGD memory. > > Reported-by: Qian Cai > Signed-off-by: Mike Rapoport > --- > arch/arm64/include/asm/pgtable.h | 3 +-- > arch/arm64/mm/pgd.c | 5 +---- > 2 files changed, 2 insertions(+), 6 deletions(-) Looks like this actually fixes caa841360134 ("x86/mm: Initialize PGD cache during mm initialization") due to an unlucky naming conflict! In which case, I'd actually prefer to take this fix asap via the arm64 tree. Is that ok? Will