Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1238857rdb; Mon, 19 Feb 2024 08:28:03 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUJ2iO1SlxbeTNHnZjt5Vn4FEe2hRAlKi73+e1+EVaXthTGBjxaxZ7hMed7wG05MSEswlNjnbV5cjdj1serCF5QeV1EMw9tWB1aClGpiQ== X-Google-Smtp-Source: AGHT+IFVXI301F/33tIcHRdHxW13gUpJAjRj3eTmUgtN8BG7oeVfDI3Poa1Oo8fgxyfzYoJWIuQE X-Received: by 2002:a05:6102:232b:b0:470:5d0a:149d with SMTP id b11-20020a056102232b00b004705d0a149dmr2311442vsa.25.1708360083320; Mon, 19 Feb 2024 08:28:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708360083; cv=pass; d=google.com; s=arc-20160816; b=aPnk3uQxeZDzjHHhtfndYfkMPUjojs3Xz37QQ0fyQdUGYfcj86ZKR4hQbGCz7NsUi5 ZFU5ofKyryHfQf17UmdgX7/KzE8A69Yx+AX08PsYgvhRT0FsPTDSo/vUnzqfF76wx+Gk 5nlcATShLg6jEz8bbxThZhO8C3305MkZmk9JEuz7ZpLC7/j1BTuqBkNz7MZ+ZSgD5fAu MkKZqFV2ieI8p0JBwEtANcuemZgpEwDSQluz11wUrYhHm7kHOPdAf2dd7yCHo0Ogv57u w7QH9H/IGL4oPL68bPkEYFCXZaszVhSA8F9Avx03je5gCao1PtHTpDPIXrVgBqhCGp/E k2Kg== 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; bh=zQhJHnudcd3Gdg6zSTjP9BEPCa7vzln8f+bhhUmFD58=; fh=z5B6a1RQkut23Ort27Mh6NbePcmHsREN2sTEv1EHbrY=; b=h2+niZDxZFcEWOIQYieIFwmY3qRnzNC6+pT4Nnel6/8U3ZxlPAq/MwsE7gp6VnEaNW dT5yRk0fmhTVb8iBEupj90J9FMl5lpaq3B/4z9gXcxdacevqDdyF7Nta+ZgiIFIGlp5A PuDsohHq+WSoW7T7cXovgUx7E0vuVwhT+cL+944LnQ+a66AbmuVqUTNrZ4wxujCQ5rdp F8CXq+pcxic1aVN2Qg4b8TldzVIQOJzx3jidSgAEPDc13x4C0ywTpIQqUEQ4MVBQbJrV OnwIFo5fNoO6I0rNvMCs4wAdQs6JNLB0IwkXchHK+w786bi+Preta1HI1tUjNT0cegNR Bjfg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-71680-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71680-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id f11-20020a056102150b00b004705004c8a4si448163vsv.387.2024.02.19.08.28.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 08:28:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71680-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-71680-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71680-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 117941C2031D for ; Mon, 19 Feb 2024 16:28:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6EE9A3FE2A; Mon, 19 Feb 2024 16:27:45 +0000 (UTC) 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 EEC983FB21 for ; Mon, 19 Feb 2024 16:27:44 +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=1708360065; cv=none; b=LCk+Fj+MkFgBAJkfVq5DsJKrubrasykIIMa8EoKzHGp/s+blniaN07l9VgQc4/wZ0FRLcpIPETXttEy7dFd84mC0UKR2675BEZv8gLM8idFVbTCiJ9fyvh7j6JK11AglTWG/YpwJLr4J2+9ye8MsvTfaDnBTkgwyp8sd+/0bncg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708360065; c=relaxed/simple; bh=vP+nkCkoSWpm8hoXCJXsjMWPc8m8PUOzLDnzg748Fek=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=lmWuCs/HP/m6tZbCVgs4ghAPyCIpHUV8mok1uCwLcWZ0W2c01xu2+YB+3FYs4QH/bhmCOk7QjLDkr68UJmzmnFoy/9XabxLO+KAC+wenlzET2aAO50ohMzYVdyGxi0puqn/Ss0wiW/phEpz9Y0Zco+3rbGQfPBDzlBHS/ZDK5qo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7253AC433C7; Mon, 19 Feb 2024 16:27:43 +0000 (UTC) Date: Mon, 19 Feb 2024 11:29:26 -0500 From: Steven Rostedt To: Oleg Nesterov Cc: wenyang.linux@foxmail.com, Masami Hiramatsu , Ingo Molnar , Mathieu Desnoyers , Mel Gorman , Peter Zijlstra , linux-kernel@vger.kernel.org Subject: Re: [PATCH] coredump debugging: add a tracepoint to report the coredumping Message-ID: <20240219112926.77ac16f8@gandalf.local.home> In-Reply-To: <20240217104924.GB10393@redhat.com> References: <20240217104924.GB10393@redhat.com> X-Mailer: Claws Mail 3.19.1 (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 Sat, 17 Feb 2024 11:49:24 +0100 Oleg Nesterov wrote: > On 02/17, wenyang.linux@foxmail.com wrote: > > > > From: Wen Yang > > > > Currently coredump_task_exit() takes some time to wait for the generation > > of the dump file. But if the user-space wants to receive a notification > > as soon as possible it maybe inconvenient. > > > > Add the new trace_sched_process_coredump() into coredump_task_exit(), > > this way a user-space monitor could easily wait for the exits and > > potentially make some preparations in advance. > > Can't comment, I never know when the new tracepoint will make sense. > > Stupid question. Can we simply shift trace_sched_process_exit() up > before coredump_task_exit() ? Reading the rest of the thread and looking at the code, we do have this: void __noreturn do_exit(long code) { struct task_struct *tsk = current; int group_dead; [...] acct_collect(code, group_dead); if (group_dead) tty_audit_exit(); audit_free(tsk); tsk->exit_code = code; taskstats_exit(tsk, group_dead); exit_mm(); if (group_dead) acct_process(); trace_sched_process_exit(tsk); There's a lot that happens before we trigger the above event. I could imagine that there are users expecting those actions to have taken place by the time the event triggered. Like the "exit_mm()" call, as well as many others. I would be leery of moving that tracepoint. -- Steve