Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp1162295lqt; Tue, 19 Mar 2024 14:57:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVzI38kAOwWNPGWNKJuDKDKl+XxZCwHH0Mp9q03fvfoZ+C0SUAAplBYH2L2oJEEoO7g2XWNxaKNe8Oag8UoKG6DtJ7QvVm/cLkhB2wuGw== X-Google-Smtp-Source: AGHT+IH6npBRwoXH4ul/acLoHCa9q9BAW3QKlqciraSrR2hGvfc8mPLVmDGQR8HlDw1jLxTlCesj X-Received: by 2002:a25:e812:0:b0:dcc:2da:e44e with SMTP id k18-20020a25e812000000b00dcc02dae44emr12336485ybd.61.1710885452327; Tue, 19 Mar 2024 14:57:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710885452; cv=pass; d=google.com; s=arc-20160816; b=Tjub51Lm+LewcLWrr1u55kfed2b4PVm7ObdKbRClk8jxclJqG6X+ai2B0hTrtiPmw0 T2FBUmqd6Xf1qh740emFLLfwjUObZUbYKmurYGovmCTih1NKmwyvlxCB0TFKhmnz4b3u VKB0dXI2wa2AbOG1MFDYMU3DNs5INMxFxDzOJILlc+YqVeRyKFBlNxd8niN30Np+wagd q+j0aMgswcx6qZ42HYo2uJ2ZZf5qkGOGPx6Xyu0C8sKQrnehguqEFXHJ6DnTDgISq0G9 ddDOA9eXEFLv4w9uofRPvw9TqapTMPND66tW75rB941ylWDdCyRsspGX2Tk4zY9UAVAK 1U/w== 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=59V8PSc+DobCXY5ch0kmzrCVhkdhbxC0+ZKh3m3nvf0=; fh=43CsJ0a1iV95XkKbd2LPAKMFD4ivHxYyq0EZR4VzCrY=; b=wXhxeIituruCs9eLe83vd+EL5mCPqCz9KxOVFzzCyM8mnGAyuqKN0fy8ZAfGyqFB/t 5nr6ZMZrIJNrYZrxCYpxOqzSDOmW0EeUu3sp5U8+Vfdty4VMMSvwVIXvCqU4nil4+Tfb X9uN8VE3aprwMV1vd+3EOQ2xAPphoq0pl4fcS3OEpysCTmxkony4pBEci/XP9iVViy6z G61izpX9QjlAKrpw9q9HCu2hLXGDubEOW0v4N4IBmmXrL2q6UqwEWQgZWvNlfZ2StYpC MOcE8srWbgO/e+x5taT6tQl1e59tr8uoviS6I6X5xQx7zZeYnK/6vF1BG7MI0cTIkGEN qC5Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b="idKWMn/e"; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-108164-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-108164-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id s20-20020a05622a019400b00430a25d23d3si12161158qtw.742.2024.03.19.14.57.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 14:57:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-108164-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b="idKWMn/e"; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-108164-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-108164-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 0FB051C21123 for ; Tue, 19 Mar 2024 21:57:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 52AC65A4D4; Tue, 19 Mar 2024 21:57:20 +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="idKWMn/e" 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 72D5657880 for ; Tue, 19 Mar 2024 21:57:19 +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=1710885439; cv=none; b=Ca/uLwUOzyGTtpg56AbFXV8R2SE1JqpMQ7GyeTOhhSJ1nqadMlzAqY1G3U9iQXARR7Up37wSir2nJi5cM08sapx+JunnI07aEwimXRUIfuJsrkEL56LRXOjEjpiRyznCSo1nd4Hu0y84x5AbLarYBzJHKBS6Km9b5V4800gNUnU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710885439; c=relaxed/simple; bh=A8FNOyGnsGiesx6nzHXmBTBc6TfNILcr784GdYp8ZZ0=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=GTvdp8kF76mO+IPWQT4Tu9x00vpeLKBnf9jU1jAN9lUGoBDUSsr3zmludx+x5Pob0A2g6iBsT2xQz+2K7zX2PRQ+HWttSGDXfY19RH+XlyZg9SIlvm6gzjmPy2qLzslZuJ3/UkoHPV3tBQ5ZsLnZQVktnjKV63gkC4PSatOmjnA= 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=idKWMn/e; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 97EC9C433F1; Tue, 19 Mar 2024 21:57:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1710885439; bh=A8FNOyGnsGiesx6nzHXmBTBc6TfNILcr784GdYp8ZZ0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=idKWMn/eP1B7F1JXGEqwQszSFmL6pNAXt9Zn6QmME3QN1UoRYmGcUzzrHKYQ0us7R mVIaug2Pc0KwIKXRHHZftj1Oe6H8pxLywU5gN5Bbj5B0ZI/0zuBrlnik1MBoPcZW2P 6Kl7fnyqhqKD+/fB/MrOC/dRPy1Nfq3IGckVUXVY= Date: Tue, 19 Mar 2024 14:57:18 -0700 From: Andrew Morton To: wenyang.linux@foxmail.com Cc: Steven Rostedt , Ingo Molnar , Oleg Nesterov , Mathieu Desnoyers , Masami Hiramatsu , Christian Brauner , Mel Gorman , Peter Zijlstra , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] exit: move trace_sched_process_exit earlier in do_exit() Message-Id: <20240319145718.2bfb0d526ff441c8b37eab09@linux-foundation.org> In-Reply-To: References: 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 Sun, 10 Mar 2024 13:25:29 +0800 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. If userspace is awaiting this notification to say "it's now OK to read the dump file" then it could break things? > Move trace_sched_process_exit() earlier in do_exit(). > This way a user-space monitor could detect the exits and > potentially make some preparations in advance. > > Oleg initially proposed this suggestion, and Steven further provided some > detailed suggestions, and Mathieu carefully checked the historical code > and said: > : I've checked with Matthew Khouzam (maintainer of Trace Compass) > : which care about this tracepoint, and we have not identified any > : significant impact of moving it on its model of the scheduler, other > : than slightly changing its timing. > : I've also checked quickly in lttng-analyses and have not found > : any code that care about its specific placement. > : So I would say go ahead and move it earlier in do_exit(), it's > : fine by me. I'm not seeing a clear need for this change. "maybe inconveniant" is quite thin. Please fully describe what motivated you to work on this?