Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2976318rdh; Wed, 27 Sep 2023 21:00:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFQa0csGgfa0adsKuhVhIUtYVORuh+t8MIQhESzAaDVeJMBDRFraz5RWB8oNUBGfQ40lHeT X-Received: by 2002:ac8:59d4:0:b0:417:fe9c:6dd4 with SMTP id f20-20020ac859d4000000b00417fe9c6dd4mr104095qtf.17.1695873605153; Wed, 27 Sep 2023 21:00:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695873605; cv=none; d=google.com; s=arc-20160816; b=KLUWgr98mOWz9NNSE7FICEZp1GYsIpCYn6iStzlTPEZAK5YdhkJ78QfKnM3LW8CyCh 93Mmosp3DvlXUcCoQRqkynVjnSWNYvbSC1TozzPcX6Lh8HOVeode67ssFqY8BHV5sKqb k3hyRuYWhNyMHCOiEiv5SdvDJdL1gcODtTvrr6UM3GqcWLVDKCmUwA2KJvSuKZtdMr2J DVUNlnveBmg6IaJ0cNnzbdnUoOp52SlNCXRKzOOS7jCQCQVjhwkZEz2AH0vV3ixNoVDL sgeECokVjS/hchHwKywpY/IiDe/MdYkuqQloQo5SrDxLlAgAjBsjPIqdQyvdbxZ2hYhQ tQaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=P9v85c4jmhhRZrQUHsn9ySk52S7+x9D7431Zb5Y+eow=; fh=5oP/1UXqGTJCn9EhtPaD4mnUJdzyrxl2TCHfeacTi9c=; b=pg4x1S65f03zXIuv5SMsOCQCyydAFbNm5rF1vYKHI1cU4O2ghzfMN2294X7dTCytl7 w/Fg2SZgq07o09dqu/ud72p362upGWhZ/+ZOLQLUl6eWLxykeSxZ4ELR6sbdM+PtlZ0b 7TONe4kfeoewxEVYm2V90MecmC8yTMzGD195qmolwir86kvdKzaNo4r4tcsPn2qJp4U0 Wka9ImFLeS8wGXgPyezOiQRR8kixJuufYyzi40vJLoDeYZFCbo7ZYpqmdWXylO8GhuL0 f4XImlmZSb75HcFT0h2ldPREGHFEDK7bgxr6phtSLQOpkFQLVUVFFw4OsZmtIGqWwBvt 7ePA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id k68-20020a633d47000000b00584e2f083b6si6008303pga.85.2023.09.27.21.00.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 21:00:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 50F0180A7CD2; Wed, 27 Sep 2023 20:55:58 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230017AbjI1Dzo convert rfc822-to-8bit (ORCPT + 99 others); Wed, 27 Sep 2023 23:55:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229445AbjI1Dzm (ORCPT ); Wed, 27 Sep 2023 23:55:42 -0400 Received: from mail-io1-f53.google.com (mail-io1-f53.google.com [209.85.166.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C07811F; Wed, 27 Sep 2023 20:55:40 -0700 (PDT) Received: by mail-io1-f53.google.com with SMTP id ca18e2360f4ac-79fc3d32a2fso287766239f.1; Wed, 27 Sep 2023 20:55:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695873339; x=1696478139; 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=u/OzhfHVlcZiP/xhGzt+v7586DoOfydkysKYz+Cs7o8=; b=prg0cy6LQocL6FFKPT+tvyDgBlCCjkxqVrgg/8zqyV9DlWzPnKePjgk9RrVs1Vwbtl 7rego5xExyWUqcVMA9prftiGE9P/bG7lDr55FTviXID1zWDPU1DmxnvRkZvdtMlsi1yE H07WMgl+3lqg1DPBFDEzIYLiqGCe0bk23Wugt64BPYJ9XpjHtc2yoh7ybTgq+hx50JMK yV4aGBtwZ4dSdPStmR5lMs/GDhrXJMZrmSd+2opQpmhI5rj3/nqw1FiviXfFH0qyphsP VQK6PjCOkv1HxLWDE5G11OCH7VD2Htiav2UKa3GQyqcNgrRg7aw3Yk4oB9cyu73rZifX lTyA== X-Gm-Message-State: AOJu0Yyas8dk4Wh4X5T6eVX9VBEoMpdFqTbYFeMtpNQ3slQYf0RmO8Dt qQzr+/XOhQW+jKVVfwBctrbpTY8nqPOj4YZPX4s= X-Received: by 2002:a6b:fe18:0:b0:792:9a1a:228b with SMTP id x24-20020a6bfe18000000b007929a1a228bmr107318ioh.2.1695873339289; Wed, 27 Sep 2023 20:55:39 -0700 (PDT) MIME-Version: 1.0 References: <20230923093037.961232-1-yangjihong1@huawei.com> In-Reply-To: <20230923093037.961232-1-yangjihong1@huawei.com> From: Namhyung Kim Date: Wed, 27 Sep 2023 20:55:28 -0700 Message-ID: Subject: Re: [PATCH 0/4] perf bench messaging: Kill child processes when exit abnormally in process mode To: Yang Jihong Cc: peterz@infradead.org, mingo@redhat.com, acme@kernel.org, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@kernel.org, irogers@google.com, adrian.hunter@intel.com, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 27 Sep 2023 20:55:58 -0700 (PDT) On Sat, Sep 23, 2023 at 2:32 AM Yang Jihong wrote: > > If perf bench messaging in process mode exits abnormally, the forked child > processes does not exit. > > The test result is as follows: > > # perf bench sched messaging -l 1000000 -g 1 & > [4] 553 > # Running 'sched/messaging' benchmark: > # kill -15 533 > # ps -ef | grep perf > root 425 371 0 09:11 pts/0 00:00:00 perf bench sched messaging -l 1000000 -g 1 > root 426 425 17 09:11 pts/0 00:01:56 perf bench sched messaging -l 1000000 -g 1 > root 427 425 17 09:11 pts/0 00:01:55 perf bench sched messaging -l 1000000 -g 1 > root 428 425 17 09:11 pts/0 00:01:55 perf bench sched messaging -l 1000000 -g 1 > root 429 425 17 09:11 pts/0 00:01:55 perf bench sched messaging -l 1000000 -g 1 > root 430 425 17 09:11 pts/0 00:01:55 perf bench sched messaging -l 1000000 -g 1 > root 431 425 17 09:11 pts/0 00:01:56 perf bench sched messaging -l 1000000 -g 1 > root 432 425 17 09:11 pts/0 00:01:55 perf bench sched messaging -l 1000000 -g 1 > root 433 425 17 09:11 pts/0 00:01:55 perf bench sched messaging -l 1000000 -g 1 > root 434 425 17 09:11 pts/0 00:01:55 perf bench sched messaging -l 1000000 -g 1 > root 435 425 17 09:11 pts/0 00:01:55 perf bench sched messaging -l 1000000 -g 1 > root 436 425 17 09:11 pts/0 00:01:55 perf bench sched messaging -l 1000000 -g 1 > root 437 425 17 09:11 pts/0 00:01:55 perf bench sched messaging -l 1000000 -g 1 > root 438 425 17 09:11 pts/0 00:01:55 perf bench sched messaging -l 1000000 -g 1 > root 439 425 17 09:11 pts/0 00:01:55 perf bench sched messaging -l 1000000 -g 1 > root 440 425 17 09:11 pts/0 00:01:55 perf bench sched messaging -l 1000000 -g 1 > root 441 425 17 09:11 pts/0 00:01:55 perf bench sched messaging -l 1000000 -g 1 > root 442 425 17 09:11 pts/0 00:01:55 perf bench sched messaging -l 1000000 -g 1 > root 443 425 17 09:11 pts/0 00:01:55 perf bench sched messaging -l 1000000 -g 1 > root 444 425 17 09:11 pts/0 00:01:54 perf bench sched messaging -l 1000000 -g 1 > root 445 425 17 09:11 pts/0 00:01:55 perf bench sched messaging -l 1000000 -g 1 > root 446 425 16 09:11 pts/0 00:01:50 perf bench sched messaging -l 1000000 -g 1 > root 447 425 16 09:11 pts/0 00:01:49 perf bench sched messaging -l 1000000 -g 1 > root 448 425 16 09:11 pts/0 00:01:50 perf bench sched messaging -l 1000000 -g 1 > root 449 425 16 09:11 pts/0 00:01:49 perf bench sched messaging -l 1000000 -g 1 > root 450 425 16 09:11 pts/0 00:01:50 perf bench sched messaging -l 1000000 -g 1 > root 451 425 16 09:11 pts/0 00:01:50 perf bench sched messaging -l 1000000 -g 1 > root 452 425 16 09:11 pts/0 00:01:50 perf bench sched messaging -l 1000000 -g 1 > root 453 425 16 09:11 pts/0 00:01:49 perf bench sched messaging -l 1000000 -g 1 > root 454 425 16 09:11 pts/0 00:01:49 perf bench sched messaging -l 1000000 -g 1 > > > Capture signals SIGINT and SIGTERM to kill child processes in signal handler > > Yang Jihong (4): > perf bench messaging: Fix coding style issues for sched-messaging > perf bench messaging: Factor out create_worker() > perf bench messaging: Store chlid process pid when creating worker for > process mode > perf bench messaging: Kill child processes when exit abnormally in > process mode Applied to perf-tools-next, thanks!