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=-5.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT 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 88526C31E5D for ; Tue, 18 Jun 2019 06:54:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6158320823 for ; Tue, 18 Jun 2019 06:54:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560840865; bh=h6KCEecYqvEUsVXMGsOj14p5VeuD+CI26MOesVKK8tw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=qlnpKCTf818hXrJSQLgfFHw2IcLle8nEAJRfUueyEsmtsSW2ST8hORZuEI6dyZ7Qh gx81OBt6vjXTwhU3moeQYbDVX2wj/1Wl2PWP0aCpkvmRO3arQTmUjJi/zFCwCb5Jl/ LOwPoFwktuI2ib6nhxeedQ5fD5GLaDDOHRGc3rdM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729026AbfFRGyY (ORCPT ); Tue, 18 Jun 2019 02:54:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:57796 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728948AbfFRGyW (ORCPT ); Tue, 18 Jun 2019 02:54:22 -0400 Received: from brain-police (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AB0AB20665; Tue, 18 Jun 2019 06:54:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560840861; bh=h6KCEecYqvEUsVXMGsOj14p5VeuD+CI26MOesVKK8tw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oBvX088a/fOuuObjn7+ntF6Kq5hoY2/4Hpn4C9r/FHAPQ18VfSrKIN6FL5H8J8wzc BBR26SXGwC+04hPIj6pp4cWe3SMe5tW99SFutH5DZAbPe6caLBBE0uSV5X3hETFvma RU/jAfOdqr0dwXiPJhdVASX8az+JIm0olJ4+olBE= Date: Tue, 18 Jun 2019 07:54:15 +0100 From: Will Deacon To: Mike Rapoport Cc: Will Deacon , 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: <20190618065414.GA15875@brain-police> 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> <20190617163630.GH30800@fuggles.cambridge.arm.com> <20190618061259.GB15497@rapoport-lnx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190618061259.GB15497@rapoport-lnx> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 18, 2019 at 09:12:59AM +0300, Mike Rapoport wrote: > On Mon, Jun 17, 2019 at 05:36:30PM +0100, Will Deacon wrote: > > 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? > > I suppose so, it just won't apply as is. Would you like a patch against the > current upstream? Yes, please. I'm assuming it's a straightforward change (please shout if it isn't). Will