Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp224450rdb; Mon, 22 Jan 2024 18:45:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IFL11ybk6rJCUlUYsUsw649QQKbXDo8/YmS/aZ416t4Yj+QQ44E90QmfDE0milkin1e3K1t X-Received: by 2002:a05:6358:918f:b0:175:c033:5f40 with SMTP id j15-20020a056358918f00b00175c0335f40mr3953057rwa.46.1705977941714; Mon, 22 Jan 2024 18:45:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705977941; cv=pass; d=google.com; s=arc-20160816; b=fKPHOS9unlUoARIZjD2BOIHEHqj8VaFAeA7tuWvc7nk0SnpQuJ0ZporanUdht0JzHI bmwxPPatp4BdKLRpGAlBJ7r3rH2EfxDV2AAolvsatAaI28BrA7ymy6LAywckPhlRjjip l47KEH0915trdCuzBM8xP4CcctHPV59v2YUnai5Vo38UNTy42396kNf5gluUjPmI8mmk 9V5xyhkjLm7zP84hQyTQbZB3nIvRagPj+QaXkAEc5lRStM0i+p5QOcxWF5ctgUraVy5t wDI4xGuz988O9eWhdSIRFHKuIVkL94Z1aMKdW74xJElq7Cw+MAAISZXafEBzO/y2VxFX +pdA== 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:dkim-signature:date; bh=8nxUAt2BRtxbUt4m0RqE/VY6i4Z/ctqEoTRjSobIK9M=; fh=torg2ZvP5yPgeQRfDN8fAiEy02RqD8g9b8m5RkreGSM=; b=zq696LP7KPUnJim8WnC32mgWxDgw2Nx0TFvf8GCfKIEfDkSigupHUfFTCVTlr7pakn 9nvGYQWAdeOJTxZVainM6m5/ORFrdl7QLqBW1/h3nlMUXD+X/JG3yoI1N2T9qRl+FcTg 3V+cuz0MadC0yUf3Se+a4ctTCmhjcYfHiTO0DoVNpeKgOfUnOI4nT/2O1i/SKR8pSjRA Dzse5Ywqpi6ag3Q1+NwNBWe66eXA7TaYHolQHvMlm9PCmKOyQpli/6fvdXDcOuuhyFK3 RDOn7+/i2EFK1jEZ6dsJ6Ya5qusDmG7WibhDSRCVOIiHeJ1ghRR56dZoOFfqLPDEbfCW cwCA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=gSxjq6L4; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-34600-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34600-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id c7-20020a63d147000000b005cda7a1d72fsi8731437pgj.473.2024.01.22.18.45.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 18:45:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-34600-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.dev header.s=key1 header.b=gSxjq6L4; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-34600-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34600-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev 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 9A889B28C19 for ; Tue, 23 Jan 2024 02:19:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 09C7F5B200; Tue, 23 Jan 2024 01:45:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="gSxjq6L4" Received: from out-178.mta1.migadu.com (out-178.mta1.migadu.com [95.215.58.178]) (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 1E9CD5A7B8 for ; Tue, 23 Jan 2024 01:45:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705974310; cv=none; b=b7r7kqv5SnqeNmB7lju5DmKhUzaaxSlgXgEZ7Bk3ohI5JqORBKLzNEYMNUjxR+ukvWqB1V5D7DiNkUCe3M6Ccq5CVEgbE/OxRQZwjSXdGsZDkKQf7a3EzvtsVae7sSB3ESnTpKW65bwdbl0SCsShLUrENww4gER2c74xgAGgIk4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705974310; c=relaxed/simple; bh=llB5x6WTwB3VTxhU+Zc/FGnN1UnmoBuh4s8GHoDEZPA=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=n84tfrNSYZij1BALsVsYCeYIN0vIyg9pMLgWXrfdx+IjTekRTmnjfjTrKnH6GOtht3EeiziP+W35JFs+tqUyWuHgtPfI0QCuUlOaOcCq8iC4BIw0NrfC0Gm6XEVAeXexpC2pg8DfBI6DJldU4Dw2vsHFlKGxFmMXM2j2F6Xuj3c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=gSxjq6L4; arc=none smtp.client-ip=95.215.58.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Date: Tue, 23 Jan 2024 09:44:43 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1705974305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8nxUAt2BRtxbUt4m0RqE/VY6i4Z/ctqEoTRjSobIK9M=; b=gSxjq6L46IdL7730XzmjlUU+g5oXXpyGCe8MDStV7Rl6olklRJYipMuNBqHPhLDmHro+6X m+Jk2/RdhAHnbSCM7UWKHafS5LxdtCVp5M3EhhMP/X6GIRCtA40TP1sjlVCRC7JpM7wgvJ +6AzA3qEg3UoxnuPm45QRHGuM22XsIU= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: George Guo To: Steven Rostedt Cc: Masami Hiramatsu , Mathieu Desnoyers , Dennis Zhou , Tejun Heo , Christoph Lameter , Andrew Morton , George Guo , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH] percpu: improve percpu_alloc_percpu_fail event trace Message-ID: <20240123094443.00007b20@linux.dev> In-Reply-To: <20240122105700.05e5ee46@gandalf.local.home> References: <20240122073629.2594271-1-dongtai.guo@linux.dev> <20240122105700.05e5ee46@gandalf.local.home> 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 X-Migadu-Flow: FLOW_OUT On Mon, 22 Jan 2024 10:57:00 -0500 Steven Rostedt wrote: > On Mon, 22 Jan 2024 15:36:29 +0800 > George Guo wrote: > > > From: George Guo > > > > Add do_warn, warn_limit fields to the output of the > > percpu_alloc_percpu_fail ftrace event. > > > > This is required to percpu_alloc failed with no warning showing. > > You mean to state; > > In order to know why percpu_alloc failed but produces no warnings, > the do_warn and warn_limit should be traced to let the user know it > was rate-limited. > > Or something like that? > > Honestly, I don't think that the trace event is the proper place to do > that. The trace event just shows that it did fail. If you are > confused to why it doesn't print to dmesg, then you can simply add a > kprobe to see those values as well. > > -- Steve > > > > > Signed-off-by: George Guo > > --- There are two reasons of percpu_alloc failed without warnings: 1. do_warn is false 2. do_warn is true and warn_limit is reached the limit. Showing do_warn and warn_limit makes things simple, maybe dont need kprobe again.