Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp1193933lqs; Fri, 14 Jun 2024 20:50:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWSOIDjxGKncOfQHUbLw2YuJ2cKBXwFK6r8EhvUKmlZC36ceWNzLqv9UFMqtB18cZygmpKJ0WqM1IIlCu3ZHfyivFnBEdJrc6rOv3O4tw== X-Google-Smtp-Source: AGHT+IG61VOUrXtUm5RnnpoOI9YZ3gsZ37bLXyE91yq0zw3QPxotQvUkEPst3Se3el9q5aCflLSr X-Received: by 2002:a05:6a20:da9d:b0:1b6:63b6:ea6d with SMTP id adf61e73a8af0-1bae7e04af2mr5326031637.11.1718423455459; Fri, 14 Jun 2024 20:50:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718423455; cv=pass; d=google.com; s=arc-20160816; b=oyFRKrlEUg03i15QPft2pu/KNKkkmkPDh/FwvViUSwUYXMaVXb3LmumE3bjjGmywDr wfIv6P/KN7Xbv79jRHbIhoW/jk/6V6gE2VZNnG82Il1TOfuYlMSIG7zWd+6yrSOvi/fL vPVCoGCRrvDi+y9ECIr9TtQQWnPMAK5bXVxCZ42XJw+2dmV0nmi2hmh/+ZhXNw8r9N9j V4uFKdMkbXdDN4yuGINuVV+mLaAULvwPOE/eRKf8NyxnXf3sy0Ic/a+20cm1SQak9xe0 FpXWypg/sxNDZ9hK99L26WcLh42QClCJdub3y8b6tOhewRIbnzuAvJ+DRYYU9fxfnLuc UpiA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=GMvh4LLu7+iHaH8H77qbd16ndaMtLZL9+Jqv+C5DkQg=; fh=uglIUg1E7cHnWSCmXH1jMLNdVOUMR8MSrdjRe+HGTXk=; b=LUBw82sv+avCLpHEKsd9RTEuKAhpU4QoDA+dryq/uHN0k8ct2vzm+ay+i8f32OKwQk 7U0FXOnpkqkXSdmxHkr7ewulMxK/AAQUX/MeJNUTPHvG4OYHB4nYAg7rzf42taz6M9se Mt8MjNXnMXlU0g6wTn85QevKzTLPAbgXk/smk60kq1mzNo4dWY6IRNSJHTC2x/N4Q9Vs EmjFoTOUWljJOxM3um3eYtDEUBFhqqSSxqezgEVQsjZuNalQPA1/977gJxgaLHnE3Igs hIur1A2XDtfEbSBOvSQzZNKSyAOUeaeMJV7YRphQYJWMvSx+j6fXNs7J28l8w7BzAg77 mDAA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=UEF442+r; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-215693-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215693-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f855ece8cbsi46758565ad.249.2024.06.14.20.50.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 20:50:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-215693-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=@google.com header.s=20230601 header.b=UEF442+r; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-215693-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215693-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id E3DC5B2329A for ; Sat, 15 Jun 2024 03:50:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6EA5CDF59; Sat, 15 Jun 2024 03:50:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="UEF442+r" Received: from mail-yb1-f179.google.com (mail-yb1-f179.google.com [209.85.219.179]) (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 31123C8FF for ; Sat, 15 Jun 2024 03:50:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718423443; cv=none; b=gagC2EvDFi3PoPF3wc3r648pukJc/3wtHrML4DBFE8nWXtOaD8natyQedkxkkfKw1H7mOgLsHMIinNk9pe9NMcqv373yb6no2TBUq6ZCs63kzY6XXW5kbHjl1zYTfyLCTAyVdBLvtAJz/0RZlfRCvy3KdneQlsCFfP57H20tmtY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718423443; c=relaxed/simple; bh=acgHjqs5bw1TUxLqFNvY0kyYBlZkhQ6Ht3dhbaj+8+A=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=UKoHvvs+UmcfidPSvZVkDUbFIaEQSOh8W/HXyzKT0iVXoaa/Dy+4uIJd9Bj8me1iAt3DtGBs9dP+BkoijNXTqB/IXe8zIRUEdiulMZRxUqAp/smr8x1KfuD8T+5DVSDfqdM+3Fb51QIByfBIbejUj3cTTs5C2Yvj9VvXuDjLc8U= 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=UEF442+r; arc=none smtp.client-ip=209.85.219.179 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-yb1-f179.google.com with SMTP id 3f1490d57ef6-dff2df7de4aso137335276.2 for ; Fri, 14 Jun 2024 20:50:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1718423441; x=1719028241; 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=GMvh4LLu7+iHaH8H77qbd16ndaMtLZL9+Jqv+C5DkQg=; b=UEF442+raKNIaURInlBvsbkvUcjsQ8bY0xLklMevg7nlBhQ+PQ2rnQe+yeHT8xFHwx lHLDOCYzRemtgYyESGWA05R8CHq92cvxZCC6N1g73FNwegUpD8y8jBDAxkTI0DFzkMUC JXxzM/QdLYh+sf2yEtCyUaD2a/OaQG6rFGXdA5JqERW378qAxVG6VP93VPW4uBKEzUGJ e2kWdaHbg0ax9Bk7AndF9s0AaYZ0q0f58dvxaHMB/l925jG8CVUbfj8PiH9oxD8igZ3L acWY1ntYomw3lGTOY0PuACH4/a6GtO6u1y7tJ27zsCtmN3iLrXTGBxHNKLhihShv8E6O A1QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718423441; x=1719028241; 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=GMvh4LLu7+iHaH8H77qbd16ndaMtLZL9+Jqv+C5DkQg=; b=vSRp1Q2hNk0iLjFw7VJR5mYxYYKzcDFu5k0PG+RALJFwehGrc22ye/UBJcsuOTHGJY 3K8/I758BtuIHj6HH14qhNuhsgmqfv7qU2J5p7MLaXW1nEZTuS+poXvjAjmsFNQEU8uz DAXaa6s61OvX/nySuzuTKEobCqBDxzA9ncUzwGbzRcKsIgQdqMazscZ38qXaca4J7+qG SzmapPZwvLE38LqL5MnOCuwo70CO73IEkBRnSr+BpXfxgtWQBrjj1aP/PsXCxgScCQFS hrD27RW0fd4BzWJuLq8z/PIizNzG23bLjumNBTy5H8Ilfmx75QOHYWQ1t5RNRb0oP0Gl 9C0Q== X-Forwarded-Encrypted: i=1; AJvYcCUAorZvbO7+9WmC++jJ6QXnaCcucmkZ0s5D3PWoV7a5lnHjQFAE0nfS11D1xsDqkQmYu6Jaw0ggwIN1LdxopnfYWOUoj3zW1F2AtFR3 X-Gm-Message-State: AOJu0YxUyJf1y4IzfyKLhBiC2Av0zqBR9oZ8qVuPQ0/v9HDqtq8lBTRf 7fInm9XlF4+pOXMUgBAg+8NI7Hx9G0P63inWf7I/8LglsOZsp8iWSfoGpnn+jhdegpLIawmdnEo /8d72IQvVo76rEg3yopU/XcTYph9nZPXR/kk9 X-Received: by 2002:a25:b206:0:b0:de5:4a92:435f with SMTP id 3f1490d57ef6-dff1543ff94mr4328265276.46.1718423440846; Fri, 14 Jun 2024 20:50:40 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240614230504.3849136-1-surenb@google.com> <20240614181950.d5cd06acba24339401c98d6d@linux-foundation.org> In-Reply-To: <20240614181950.d5cd06acba24339401c98d6d@linux-foundation.org> From: Suren Baghdasaryan Date: Fri, 14 Jun 2024 20:50:27 -0700 Message-ID: Subject: Re: [PATCH 1/1] mm: handle profiling for fake memory allocations during compaction To: Andrew Morton Cc: kent.overstreet@linux.dev, vbabka@suse.cz, pasha.tatashin@soleen.com, souravpanda@google.com, keescook@chromium.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Jun 14, 2024 at 6:19=E2=80=AFPM Andrew Morton wrote: > > On Fri, 14 Jun 2024 16:05:04 -0700 Suren Baghdasaryan = wrote: > > > During compaction isolated free pages are marked allocated so that they > > can be split and/or freed. For that, post_alloc_hook() is used inside > > split_map_pages() and release_free_list(). split_map_pages() marks free > > pages allocated, splits the pages and then lets alloc_contig_range_nopr= of() > > free those pages. release_free_list() marks free pages and immediately > > frees them. This usage of post_alloc_hook() affect memory allocation > > profiling because these functions might not be called from an instrumen= ted > > allocator, therefore current->alloc_tag is NULL and when debugging is > > enabled (CONFIG_MEM_ALLOC_PROFILING_DEBUG=3Dy) that causes warnings. > > It would be helpful to quote the warnings for the changelog. And a > Reported-by:/Closes: if appropriate. This was not really reported anywhere but if someone hit this condition (it requires compaction to be running) then the warning would be generated. > > I'm assuming we want this in 6.10-rcX? Yes please. Otherwise someone will report that they are getting this warning when the system is under memory pressure and CONFIG_MEM_ALLOC_PROFILING_DEBUG is enabled. > > Please help in identifying the Fixes:, for anyone who might be > backporting allocation profiling. I think we can mark it as Fixes: b951aaff5035 ("mm: enable page allocation tagging") but it's really a separate patch which covers a corner case. Please let me know if you want me to send a v2 with this tag added. Thanks, Suren. >