Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp583987pxb; Wed, 27 Jan 2021 15:52:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJwrh+E6s+Bwilf/bn1WcToBcgiFSh8idQPKLevS6jJRd1+gUtHCMkinag4Gl0MLAcSPF+KF X-Received: by 2002:aa7:ca55:: with SMTP id j21mr11070300edt.172.1611791541560; Wed, 27 Jan 2021 15:52:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611791541; cv=none; d=google.com; s=arc-20160816; b=jmbfDXQnmVd/fl8TSl8EOtm08m9vfflnlhJyGaD2g0/ry7iDyQkEHU11hEUBlsw3j3 Yl+IAO1/ecOxNycRszcvLvCwl6ZbSWLFnf72e9Ss+LPcqkQOIpqThWr1ipn1TZ/o/6KU pyxenGt3Bwct99DvaZz1boQSSWZAjlRMcFAKl46usJDeUkfk7t70qxPI1NDRHzVVwYIi NzCPxuL+RvYjjfAK7u5VrTrcjl5JjaSWbHOZmZQn95VlsMpuVd1kFzOGNd9v8yyCmLEM 9kchAvz99hxftc5K+bIphvsFTspuw38VAUQsit5MNGFL5B6xCOJ2Rcth2HDWJLxq+8BS MDeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ZfcEs6t2I7R15rozZkMFZBuCR3007oZ60LC3nYyYyfM=; b=1HAf7gBm0/DpNvYbAGSO15yezWx3O39Y8vv6xsmEli73myZ0FHnxcqcRnyErGmY7si FeH681X7MBpzo9QUkj9NkmJbnHWaYzmJ+HQ24nWVpc498wiz1S+g6gMD5LyJA00IngdC AQ1T6Gjbm8DtYyv1X7iamWFSTEO7KH/aToVsRxhZ5uFYxRyduqg0tieFE5rts2yseN6V TdJ+rW2jI2LwFaj8Ffi8uvr0niQuO+ux8DFD64MZt9ivMtf3F1c9+Ojecak9EtPqNLy0 RaonKG9lspUKdYf7sQRRlxZN9gc0HgeopI4ymRjA5pRMEcYbJq/wvDvV/2MDqYYMEQKm +28A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PrhiFimK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ec16si1133760ejb.160.2021.01.27.15.51.56; Wed, 27 Jan 2021 15:52:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PrhiFimK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236419AbhA0LQj (ORCPT + 99 others); Wed, 27 Jan 2021 06:16:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234760AbhA0LOb (ORCPT ); Wed, 27 Jan 2021 06:14:31 -0500 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30D93C061573 for ; Wed, 27 Jan 2021 03:13:51 -0800 (PST) Received: by mail-pf1-x432.google.com with SMTP id t29so960535pfg.11 for ; Wed, 27 Jan 2021 03:13:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ZfcEs6t2I7R15rozZkMFZBuCR3007oZ60LC3nYyYyfM=; b=PrhiFimKySrCNEjADxP/RoxYWeWD/L0CCG4KTMobkd8rB/K8aLVA/SbyTdUeVfn1KU SYfRXG55iqgTfw9JIY5xhGSl3fqdDBYmvX/hwqHUxoXyHVtzOiGJNIh5BFx+xb8uqdwc szmINFJmsWqgs5bb6a5D9XWfoY+NMZ/JpvnQpuyxQcwW1Q3KuMo2D1BarQzUiVqh1n/R nRfagxCKEBdyaXGs4SXuOAKezOaoNL8rCyXqmy4vPYy2tLUmCbV+1TxzoIIBnIzX09on aPZBg+07YNZG2JkuGyaqrHHoFmHkv00NAR/+UD76G/FS8hXXfAALd+5+UvwmynnItmkr klcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ZfcEs6t2I7R15rozZkMFZBuCR3007oZ60LC3nYyYyfM=; b=pBA0cRKlsOI3auyCEn7hYQOoTx5TIOp10QrvdZAtJaDgbn5OZEYOcOYPc/UH2xLQ0X CSO3yWCIEbzmzHTEkYRcs1qhPXC0K8mEovTxPB61FHxK7YzPdDzxrkqKJITMdGrLU6jQ tq5U5zXngugxA+9hoPmRxTzwB0d+yOr809ZPZSSURIdRrU9rIjZtzVm/irISIl/ZWnSA U01RWR0gwB/inM+KbaBI2nrt5ODL3Pq2kaueBRNgp+yI5OaG6H6Sg6YQHCHKtXt5fy9T s78ieDCxI/x8yQaKbpvH33eUEkze6B+nZcEyFGUbnv79FwALbgJJqWByhLTIwUl7CO8U BGfw== X-Gm-Message-State: AOAM530CulpRxjwklXB3Uxl/20X+4Mz0+Ye1i0Z6OyJTsaMyLMBJmkgK LgowcxI2r8QfBIzALb/wXYXRu/7tkShQNWPQ X-Received: by 2002:a62:f207:0:b029:1c0:434b:cc14 with SMTP id m7-20020a62f2070000b02901c0434bcc14mr10117882pfh.11.1611746030607; Wed, 27 Jan 2021 03:13:50 -0800 (PST) Received: from localhost (61-68-227-208.tpgi.com.au. [61.68.227.208]) by smtp.gmail.com with ESMTPSA id n2sm2058354pfu.42.2021.01.27.03.13.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jan 2021 03:13:49 -0800 (PST) Date: Wed, 27 Jan 2021 22:13:46 +1100 From: Balbir Singh To: Weiping Zhang Cc: sblbir@amazon.com, davem@davemloft.net, Linux Kernel Mailing List Subject: Re: [RFC PATCH v2] taskstats: add /proc/taskstats to fetch pid/tgid status Message-ID: <20210127111346.GB59838@balbir-desktop> References: <20201217170009.GA29186@192.168.3.9> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 22, 2021 at 10:07:50PM +0800, Weiping Zhang wrote: > Hello Balbir Singh, > > Could you help review this patch, thanks > > On Mon, Dec 28, 2020 at 10:10 PM Weiping Zhang wrote: > > > > Hi David, > > > > Could you help review this patch ? > > > > thanks > > > > On Fri, Dec 18, 2020 at 1:24 AM Weiping Zhang > > wrote: > > > > > > If a program needs monitor lots of process's status, it needs two > > > syscalls for every process. The first one is telling kernel which > > > pid/tgid should be monitored by send a command(write socket) to kernel. > > > The second one is read the statistics by read socket. This patch add > > > a new interface /proc/taskstats to reduce two syscalls to one ioctl. > > > The user just set the target pid/tgid to the struct taskstats.ac_pid, > > > then kernel will collect statistics for that pid/tgid. > > > > > > Signed-off-by: Weiping Zhang Could you elaborate on the overhead your seeing for the syscalls? I am not in favour of adding new IOCTL's. Balbir Singh.