Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2999397lqz; Wed, 3 Apr 2024 15:09:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXJa2150MAshKKfXLiLRL892PDp34meFitxEW/27GCLf3yMWenfv+bcuQNkR/1yTDjBIWnYYCrCTrWZ4MMNmGgSOL0336ZCrsdM3gK2aw== X-Google-Smtp-Source: AGHT+IE0N4mtoXrobVznCRu7ovDq4jWwR6FIWVAf1dTleXIlFWGzRZQzLftHNq5342h+EpIl2xgG X-Received: by 2002:a17:902:dacd:b0:1de:fbc8:53af with SMTP id q13-20020a170902dacd00b001defbc853afmr732246plx.25.1712182145014; Wed, 03 Apr 2024 15:09:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712182145; cv=pass; d=google.com; s=arc-20160816; b=J2rkD6p1BLg3w0QxfSkLF4yubk5Sn3w8SIpwlWWsbtbrVifD2II1841MJqoTzQT8j0 JyhL+s7NkMqUmPdirTHheNFWiEIGWfIS5bc16fYI0M2wQOEsLeuUzcaKCScD8kX+922S /vRloNGp45gVC5u43XZKwVf7nButesTNSmzRnZhCFNJRnLQoEaBh7TddiArA4RVVq9hM iAnCEqBUS6hhYQgxCF3M4q8rKZyiVHZIcPeg1qNvWSnBEQz/yWXLcaCrgOrFfkN8EekO r4q48XWRXZT5058zoQ3BzFkDgyLYoRfOod+tzIFNsNYx839omYjuwUcUbY1B01b8miQe Lktw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=2nkufhyA/xsWZQWxFBYmwJwlB7P2mmbJZdrcboKlE/w=; fh=O4vN1FwZ3oeA6aKipD2WB966j0y89pzt9gxFIsCpc5o=; b=X522ZDR0164/CJjzSd4I2crk0oAEtsN5erzh/nYswuEkgOcyAHq8nSSn9YEpmAahKR KukTue0A8r/hxvQIBN3X6D3pu785kpxzyWMQIgfS7UyHNt5E9pfdgsao+Xd/JuWVHZgs /A23XRmi+AqcX4gf2Y3HxwKLtR9d9PjeBxLbAm+IbBiXqZxleCU9yxRk5uS1Nx/4tRif sp6NhQLu90i0M/zlDhMR4hypcOZtClWMZQMZ3FydFkMiuKOprvmm2Sv7mCsCd6kkdZak YtZgTYkBFKEAf/kqgloBCSWvDph5lin6V6firdBvAAmX4C7LrudYWgfaU8txZwbPZSIl 4hsw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b="l9h/o02G"; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-130659-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130659-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id b17-20020a170902e95100b001dde10a6b04si14214461pll.187.2024.04.03.15.09.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 15:09:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-130659-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b="l9h/o02G"; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-130659-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130659-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id DCE94B26158 for ; Wed, 3 Apr 2024 21:57:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 45035156891; Wed, 3 Apr 2024 21:57:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="l9h/o02G" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6A76615099C for ; Wed, 3 Apr 2024 21:57:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712181441; cv=none; b=ofZgrn6r5v/LUG8Z9Di2IB+29myd3q96b12RvG+yTwLcoYkNNyJW7bUMI25LAb/x+rNoigHLajMoyT4HIx8StPs3Y6eZLvScfaaOOUsQ3LopmKmyVnHeQZnwnDr2PccfCMXPesKjfCCcP9Yyp8/PXqbx4ne0QoTiEw7X7PNpII0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712181441; c=relaxed/simple; bh=swXtrHA3rER2QJ+fD07Evx50D4gtMpu+HnO1sa4c/EA=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=TVZ09V7SplSNWVtch+UjrfM10u18LDQvwVMKDX0eSWlnPxOT4JyM37fZ05VBD/dZIMb7rQiqjyPEKY5As9uxqJYjth0RABOVs2HzKlAcw7gkFG9//w7aXnVkb7mXU9+gT2FZSHnXGQ4dlSgB9B/YTiBEYi1ymmPwQPHYDOLefL8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=l9h/o02G; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B2CFAC433C7; Wed, 3 Apr 2024 21:57:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1712181441; bh=swXtrHA3rER2QJ+fD07Evx50D4gtMpu+HnO1sa4c/EA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=l9h/o02Ga244YGSNLzrpYM0UcrQRElwNL5U/5YHYYALTPPLZn9YgtrmeyMFLTeySb 3xxFIMHilLdG3rmPXE+wbgra/DXAXAqdSoHz4QM9t3LDsmWbSJ6Rk7zsPzVeaqQz15 9Z7DiM4D/Y0S1s0nkAwfZoQqJ65CSaIAx5SrRD/s= Date: Wed, 3 Apr 2024 14:57:19 -0700 From: Andrew Morton To: Suren Baghdasaryan Cc: sfr@canb.auug.org.au, kent.overstreet@linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel test robot Subject: Re: [PATCH 1/1] lib: do limited memory accounting for modules with ARCH_NEEDS_WEAK_PER_CPU Message-Id: <20240403145719.547d1083fede2cb4ca2c41ef@linux-foundation.org> In-Reply-To: <20240402180933.1663992-2-surenb@google.com> References: <20240402180933.1663992-1-surenb@google.com> <20240402180933.1663992-2-surenb@google.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 2 Apr 2024 11:09:33 -0700 Suren Baghdasaryan wrote: > ARCH_NEEDS_WEAK_PER_CPU does not allow percpu variable definitions inside > a function, therefore memory allocation profiling can't use it. This > definition is used only for modules, so we still can account core kernel > allocations and for modules we can do limited allocation accounting by > charging all of them to a single counter. This is not ideal but better I'll queue this as a to-be-squashed fix against "lib: add allocation tagging support for memory allocation profiling", OK?