Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp588433lqe; Sat, 6 Apr 2024 14:43:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVdbpfAdphrNExsRKDSASR+irNbWO5jY3/U4dsnc0et2zaNKwwHBbKgEMAOhMojeno9tqI9jBOa18GKDjDdf6N0sJr9nTPJVokoObhPnw== X-Google-Smtp-Source: AGHT+IGsvnfHUUvkVYBRBRmQf3OzJHhMfjciD5lx1nlbI88dTu9Jt2DYLYzY9e8FDxa5fwFpLbs5 X-Received: by 2002:a17:907:1b24:b0:a51:b463:6b41 with SMTP id mp36-20020a1709071b2400b00a51b4636b41mr2794462ejc.61.1712439791594; Sat, 06 Apr 2024 14:43:11 -0700 (PDT) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id gs44-20020a1709072d2c00b00a4e207ee793si2200526ejc.646.2024.04.06.14.43.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Apr 2024 14:43:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-134092-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@google.com header.s=20230601 header.b=ArScyxrv; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-134092-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-134092-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=REJECT sp=REJECT dis=REJECT) header.from=google.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id CC32C1F21C91 for ; Sat, 6 Apr 2024 21:43:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EC48E4F88E; Sat, 6 Apr 2024 21:42:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="ArScyxrv" Received: from mail-oi1-f177.google.com (mail-oi1-f177.google.com [209.85.167.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 337814C7B for ; Sat, 6 Apr 2024 21:42:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712439777; cv=none; b=NRzpD+JqxhKWAGwRIR/0Ga7oFRkDL78PPiCZ+ISwsyoMd453Yd0CXRBqcqoDYOuanSN+KDtJjYbAVN6NfKPq5aIDCrJTQIsxSQz5QL4D7DVdmBaBNBj/AGW/wwytw1YZvceCGCjRHOQzeE8z+1xEfu2dKOgqHEfZae+ZwQsM6Kw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712439777; c=relaxed/simple; bh=fYYeF3MecFw24NiAZ+QMoa0g1C92UzUGo1u5gHhYFXk=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=sZfTC2zsT3ndKkzpGNaw7Zl3fdUfSfEH51CT5i4SUFCBTSje1oaFoIzohFFAh8xWY/qTQwP5Gml0/uThj0allyamDjwUbwEE5vbP8uWZrTLEQC9IigyV/bUsKsR5f7cTsgsfFCQU/jZrQLyGXAREQJfteLedRSYSB9N2FFB4Dug= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=ArScyxrv; arc=none smtp.client-ip=209.85.167.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-oi1-f177.google.com with SMTP id 5614622812f47-3c3d2d0e86dso1549142b6e.2 for ; Sat, 06 Apr 2024 14:42:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1712439773; x=1713044573; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=m1G9gUrNc9dGzPe7AYM33DPZfjgc9cVYEl/DEKm89Aw=; b=ArScyxrvfDWduVY/F8RejzGRYbuEijxm5/8n92WYtfUl5vp1jQ1vsGr/rGbZpBlBxZ J6kz1YqYIYQ7RCwWhEdKndv6GK/Crx44nF8gZ8xxlCc2q0y8GqRWWgkmTg7YZNDcMdxQ 0ckBbVjtgW6qTsxXOKggz9Csb/hW8tx8TEtd8Dws8cG8nErJ5gqkA0pTuYO8yqlVRwOw sqI6UmpY9+CLGPZyCdpTpNkWiJTP4ee0wzqhNPR7KWylbD7V+uyqn01BShAUoRiCQ/qO ui8N+sVN/ptI7J/TNHBcshtflTCbc2H1dw+T81NJOB5eP3I4kRgTWlAlyRZF+a8VyDd/ AESg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712439773; x=1713044573; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=m1G9gUrNc9dGzPe7AYM33DPZfjgc9cVYEl/DEKm89Aw=; b=ETpJ52BKlPLv5JMVYvB4C2TETKT0SWSI/uOTrjqUHFQFvs8A+sAWC7nomeedmB8Xoy g0erw6LMvOZFPotMhbUkLmvzpa2jdw9bK6M+xTvwQOTVIGKKjGvGNrsyconvfyG/bUKh L96uCf7upoOMwUgE6zMW5YHTrKyrofoYebJHHWG+pFk2LAo6m+UOzXR1Szev5p7/zaYA V0FifGcKt3yw2sx09XwrKPyouY59SiC719ynB1qyKi8GMxFQ6WP87tNOOuKD44HFoXXv vIIMw3/ozMTXsEWH26nbD0Z76tILNHwBlNc4KcKHZbx3q7ywAdeEaeRkKgzqM8wZ25ex yK0w== X-Forwarded-Encrypted: i=1; AJvYcCVQxblJAMW61y+m9aWVAPbhgDGbo5jmUmseqd8lAQSlsL7sAB5bbE465P4XY3OkDIylR7zAbbCpul/tH0aoO+FPvWnyJGhfo1lXrNpB X-Gm-Message-State: AOJu0Yzo69wTcJfgyRzhwqnMpmB7F992jscQJV837q3i+m9/WaMHC4Xq Lld2bTa7pdFzrQ6hL9tPL+16syFcfMiaiuFTawmVDfMncgUyGd0QZt72HlIaMtJkACcGjnlP/RX baIqgDYjLL9TQz8aeJFqgir3Y53Nvk5i5OzBH X-Received: by 2002:a05:6808:3084:b0:3c3:dcfc:f694 with SMTP id bl4-20020a056808308400b003c3dcfcf694mr5989197oib.47.1712439773006; Sat, 06 Apr 2024 14:42:53 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240321163705.3067592-1-surenb@google.com> <41328d5a-3e41-4936-bcb7-c0a85e6ce332@gmail.com> <3d496797-4173-43de-b597-af3668fd0eca@gmail.com> In-Reply-To: <3d496797-4173-43de-b597-af3668fd0eca@gmail.com> From: Suren Baghdasaryan Date: Sat, 6 Apr 2024 14:42:40 -0700 Message-ID: Subject: Re: [PATCH v6 00/37] Memory allocation profiling To: Klara Modin Cc: akpm@linux-foundation.org, kent.overstreet@linux.dev, mhocko@suse.com, vbabka@suse.cz, hannes@cmpxchg.org, roman.gushchin@linux.dev, mgorman@suse.de, dave@stgolabs.net, willy@infradead.org, liam.howlett@oracle.com, penguin-kernel@i-love.sakura.ne.jp, corbet@lwn.net, void@manifault.com, peterz@infradead.org, juri.lelli@redhat.com, catalin.marinas@arm.com, will@kernel.org, arnd@arndb.de, tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, x86@kernel.org, peterx@redhat.com, david@redhat.com, axboe@kernel.dk, mcgrof@kernel.org, masahiroy@kernel.org, nathan@kernel.org, dennis@kernel.org, jhubbard@nvidia.com, tj@kernel.org, muchun.song@linux.dev, rppt@kernel.org, paulmck@kernel.org, pasha.tatashin@soleen.com, yosryahmed@google.com, yuzhao@google.com, dhowells@redhat.com, hughd@google.com, andreyknvl@gmail.com, keescook@chromium.org, ndesaulniers@google.com, vvvvvv@google.com, gregkh@linuxfoundation.org, ebiggers@google.com, ytcoode@gmail.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, bristot@redhat.com, vschneid@redhat.com, cl@linux.com, penberg@kernel.org, iamjoonsoo.kim@lge.com, 42.hyeyoo@gmail.com, glider@google.com, elver@google.com, dvyukov@google.com, songmuchun@bytedance.com, jbaron@akamai.com, aliceryhl@google.com, rientjes@google.com, minchan@google.com, kaleshsingh@google.com, kernel-team@android.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, linux-arch@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-modules@vger.kernel.org, kasan-dev@googlegroups.com, cgroups@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Apr 5, 2024 at 8:38=E2=80=AFAM Klara Modin = wrote: > > > > On 2024-04-05 17:20, Suren Baghdasaryan wrote: > > On Fri, Apr 5, 2024 at 7:30=E2=80=AFAM Klara Modin wrote: > >> > >> On 2024-04-05 16:14, Suren Baghdasaryan wrote: > >>> On Fri, Apr 5, 2024 at 6:37=E2=80=AFAM Klara Modin wrote: > >>>> If I enable this, I consistently get percpu allocation failures. I c= an > >>>> occasionally reproduce it in qemu. I've attached the logs and my con= fig, > >>>> please let me know if there's anything else that could be relevant. > >>> > >>> Thanks for the report! > >>> In debug_alloc_profiling.log I see: > >>> > >>> [ 7.445127] percpu: limit reached, disable warning > >>> > >>> That's probably the reason. I'll take a closer look at the cause of > >>> that and how we can fix it. > >> > >> Thanks! > > > > In the build that produced debug_alloc_profiling.log I think we are > > consuming all the per-cpu memory reserved for the modules. Could you > > please try this change and see if that fixes the issue: > > > > include/linux/percpu.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/include/linux/percpu.h b/include/linux/percpu.h > > index a790afba9386..03053de557cf 100644 > > --- a/include/linux/percpu.h > > +++ b/include/linux/percpu.h > > @@ -17,7 +17,7 @@ > > /* enough to cover all DEFINE_PER_CPUs in modules */ > > #ifdef CONFIG_MODULES > > #ifdef CONFIG_MEM_ALLOC_PROFILING > > -#define PERCPU_MODULE_RESERVE (8 << 12) > > +#define PERCPU_MODULE_RESERVE (8 << 13) > > #else > > #define PERCPU_MODULE_RESERVE (8 << 10) > > #endif > > > > Yeah, that patch fixes the issue for me. > > Thanks, > Tested-by: Klara Modin Official fix is posted at https://lore.kernel.org/all/20240406214044.1114406-1-surenb@google.com/ Thanks, Suren.