Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp3280134lfo; Mon, 23 May 2022 00:34:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPUQrx0kUljCuNKEbT4/pGgywZwJ4zj3mqgLIPwCdyjAtjZblhaxvtDsI+hsj2TwQjOCEY X-Received: by 2002:a17:902:c612:b0:161:e095:8ff6 with SMTP id r18-20020a170902c61200b00161e0958ff6mr19245538plr.145.1653291285731; Mon, 23 May 2022 00:34:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1653291285; cv=pass; d=google.com; s=arc-20160816; b=R0urlB04A4ALqWZQ1T0be1bLj5mSwT0hIL0h+TLSa/33of83nXfVd2+N7MZM6GG7rt OfTj0SVzAwp7YO8+p/jLOj/DDKP90XPolo7LgIJJO311ww5uQwMZj8xio/ZG9DhXaR2X HzrSQd1j2aoDsuHJiV5oFFqUU7LDqxBqUYctfzh2lvQibK5KccrDW+e8xwCyT6uCCW63 KVAyGTWEBfufW4PIOz70w8fqjAbsTQJ/I7sUdpoeDYs8dMHEsI1Op5hcAzhQjiIbLR2O wlUbd2OlDcM8msbK1keHoV0KBkn42t1V9zbRm+aKXhYSji01NDxi7IA13ace9U3iG/au jmPw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=RTeQWk2uEdnNz7G7Y/KJAeI2aPGMBpJrhLcIXKIx3Ls=; b=txLTK+r46bd4CuH6GoYqoDIbOhG+J2EvmSI/Wnz/a8LBKiwBILH5ggbGPN3pnNpbSF KYa9pYQOYpEwXgQAY5FzMmuRUYWHuCe6x+KbjpQdSSIQW63BC/yXELhE7WA7mn/nCLxs DWZfy2JDk951855QpROAmkAgvrax0Uv2N1pdtpjsB+yl6AZrKDC/b4TsmbKSHmjtb+Ke bswr2ImM3apkgjhq+KZOdw0sqB3zY+MgYRfG/GML1FNO7EFtxsE7R+hAVu1bRSdRaZY3 bl1IyQ9e/AJm2m1KM4hjHe+ovQ0jmlXdugZz5GqWfSt5x4uXJB2Tqvxjw7Evj4BZfNOg EZbQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b="eUH/+Qaw"; arc=pass (i=1 spf=pass spfdomain=fb.com dkim=pass dkdomain=fb.com dmarc=pass fromdomain=fb.com); spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=fb.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id 14-20020a63000e000000b003c6157157b1si9977446pga.144.2022.05.23.00.34.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 00:34:45 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b="eUH/+Qaw"; arc=pass (i=1 spf=pass spfdomain=fb.com dkim=pass dkdomain=fb.com dmarc=pass fromdomain=fb.com); spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=fb.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B1C2B1B1779; Sun, 22 May 2022 23:45:10 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352337AbiEUAxA (ORCPT + 99 others); Fri, 20 May 2022 20:53:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235683AbiEUAw5 (ORCPT ); Fri, 20 May 2022 20:52:57 -0400 Received: from mx0a-00082601.pphosted.com (mx0a-00082601.pphosted.com [67.231.145.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D47821AD5AD; Fri, 20 May 2022 17:52:56 -0700 (PDT) Received: from pps.filterd (m0109334.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24KMsHvw029503; Fri, 20 May 2022 17:52:30 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=facebook; bh=RTeQWk2uEdnNz7G7Y/KJAeI2aPGMBpJrhLcIXKIx3Ls=; b=eUH/+QawHUtXDPUm8GIZeDcQUDGSa1FnL1qbfWGD+Xx/ssVlT3rklTD2uCY4rYiaCczh GMXcuTQ1Ad0I7Wf5ryWMLBUoO0tgUdxXZzxEK+xjDXnOp1VBe+rz4tE7wCuzygsRbTJe ObiUjybOiXXi/EurPhtFDVEVnTyh+cl3bps= Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2177.outbound.protection.outlook.com [104.47.57.177]) by mx0a-00082601.pphosted.com (PPS) with ESMTPS id 3g5xexfwyb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 20 May 2022 17:52:30 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HZZ+HNlod5LBgk1D2bnPnWKsEINgIRHHk9QR+NrSEzPJ74RwmAX+fdKCwM+sMcl0bcJwDkZ9vEZgCJ/rmDYAyKIKj4Oq7Ngppad1dTHiLnxGjVhvwfVOQzFtPGRWV7TNpdsMw5Vyxw0AAbeXMbmbZEbkwtDmglIIJEprtDC+PIIcP6t7CyXYWR+9k8EpqJLCoOYo+QAXzwluAV3+l7hSTBp/RHKI3P0FopKAcjiB2O5Z9Fp57XkXCIFHR/h/S43KfuvBNODpK4Gn9Uth+/MsRQoaXCrRNHJw6lW/r+5ruh8v2n4Fsk0SWuoqPfs/347df1ngp0+JcCXvAewFxSLmDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RTeQWk2uEdnNz7G7Y/KJAeI2aPGMBpJrhLcIXKIx3Ls=; b=I3YKdgWgmO4nn1rj44C9D9c0FFxzxaypxAmu8CJ63RfcZ+/mnP4917QUl3YjCmolqbNDVOHwmpjvEZdSIDjWONHXhltNnMFLF1PgUkKAwOZZpXoH7vxWnbhYWaXrxpwR2baTOoz3IZh2329IZR4+SdJF2V/ANbgtIEBUM4PyP3CiqFOu1fF9CTn2If0oi0/VGrZN2sWPC/CYk2wjJjkG0PsjeK6IpWJr8Aib3QJuPsBLqeCLbi0K5Hppyn6rCi9dzp/BWQ530+eTMg1OWWsKmZLprcPyJdRQyI1JwsyriIk/8WpxJqlheAojCRbF5lx+/hsWTgTbmdWS/XuFF1ZwKA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=fb.com; dmarc=pass action=none header.from=fb.com; dkim=pass header.d=fb.com; arc=none Received: from SN6PR1501MB2064.namprd15.prod.outlook.com (2603:10b6:805:d::27) by SJ0PR15MB4233.namprd15.prod.outlook.com (2603:10b6:a03:2ec::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.19; Sat, 21 May 2022 00:52:27 +0000 Received: from SN6PR1501MB2064.namprd15.prod.outlook.com ([fe80::5811:4996:bbfd:3c53]) by SN6PR1501MB2064.namprd15.prod.outlook.com ([fe80::5811:4996:bbfd:3c53%7]) with mapi id 15.20.5273.017; Sat, 21 May 2022 00:52:27 +0000 Message-ID: Date: Fri, 20 May 2022 17:52:24 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH bpf-next v1 3/5] bpf: Introduce cgroup iter Content-Language: en-US To: Tejun Heo Cc: Yosry Ahmed , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , John Fastabend , KP Singh , Hao Luo , Zefan Li , Johannes Weiner , Shuah Khan , Roman Gushchin , Michal Hocko , Stanislav Fomichev , David Rientjes , Greg Thelen , Shakeel Butt , Linux Kernel Mailing List , Networking , bpf , Cgroups References: <20220520012133.1217211-1-yosryahmed@google.com> <20220520012133.1217211-4-yosryahmed@google.com> <73fd9853-5dab-8b59-24a0-74c0a6cae88e@fb.com> From: Yonghong Song In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed X-ClientProxiedBy: SJ0PR03CA0041.namprd03.prod.outlook.com (2603:10b6:a03:33e::16) To SN6PR1501MB2064.namprd15.prod.outlook.com (2603:10b6:805:d::27) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 944b0a0e-9b86-4984-8896-08da3ac42cf9 X-MS-TrafficTypeDiagnostic: SJ0PR15MB4233:EE_ X-Microsoft-Antispam-PRVS: X-FB-Source: Internal X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wtrqhtOjr5Qc/DDn46pqUqIQ+9Vk0lVrPl23ytpEdD7Zzwbhj7LB035wS2B3BWxwMO2lVPJ7tE2aADJjcYLdt5A+Wx9Zf7k8dXi9jeR9q6G7Z5G/YWH/E/b1wJMRZY4Zal6G/Vk8AcudPpLtZdxryvvc1A8InWZJVr3XYs33Y+qCim44gDAG8aK4MI5xTaDYRXVuTmiF1xUEqMvwOKj0xKD2Lr+J+fCZ3Z3j8TTz7NBKYDehRN+S0brupAVv+GPgr3icqGz67ybcHu19wLeaIKw9qyFrry3YKJMPISClcyu/JYi9h7eyMidxnHgbdNi8Lo7K9qpmTm9GP+qylFoMn94ppSw5U8W54EUHStAD2by4MqPq+3PptxGeJhnSZ6AjCkQQhOioPj095CwqZzDH50xtFocwdK54JJyTloZtmBBmXaPdL6KYeRz7t2PT+xS47yGGK4a2pxGzsMytC2KcvnwQ2pKefICX4zvucU2qaUriG2SOg642itpKyJrm5wbBvwTSxEAqTPcuxh7HE3uQFNieVEWv/aHvvPTatuE5OyvMuAxluxBJm1+8dXFR7cQrvgn0uabbmhQsVgvNUvUhFUjHnrPDAFz2+y2/x/WvpPZeniz8Cc95yl3Pd3EbiC1AjyHMmd8efJGf97QXq7A6L0cgU04oaptSB8vZFHfk3VcSdx+tAojwwYbhnPwDbCUbVkOdme9OgzKxsPJX39VtAjtffuz2RZCEtgjePcLIH9gKRLrggxfnaTt5iiDyipCchq0xsEDF8oylnCnuebKNic61GExVrxuRpjpoMHT++GJirBAOKaSJsi/5OhrsyB/tnQ2vIHLrZCZnelrEfmpCHA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR1501MB2064.namprd15.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(6486002)(966005)(186003)(2616005)(8936002)(36756003)(2906002)(5660300002)(7416002)(31686004)(508600001)(316002)(54906003)(6916009)(38100700002)(8676002)(31696002)(86362001)(66476007)(66556008)(66946007)(4326008)(6666004)(6512007)(6506007)(52116002)(53546011)(43740500002)(45980500001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TnkrVDBCOW9SdXFpblA0RE41WT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JFTU1yTU1wMFdRMzA3WjZOOUZaQjZzbExDVXFQV0QwaFMwbGJh?= =?utf-8?B?UjhJY2MvaVVQdHNLYnVLUk0yNnNNeW0yeDg5dVZYcVkrcjJYMkNEQzdZUXo3?= =?utf-8?B?U2ZtQUg2YlpZOFlBcjlPUE41ejFUQTRpdk9aSUJhS3E4WDUxTVB2M3FPS3N1?= =?utf-8?B?Wnl2ZGZSQ3JqRVd2Vk05Mm9VbWdXcWdMVUxGVHlTYUQyY1c0cWs4V1Y0ZGhl?= =?utf-8?B?cllXU1RNVE9Fb0pMOWxCOWQrT0ZNRStBNmk5MEV0alZjQzM3RFYrOVNodDhw?= =?utf-8?B?UHZncmdTWXhlQTRsNmxMcmozZjJBb25PMmhxaE9qbHNvYW80RmhLeThsV3FH?= =?utf-8?B?S3FlcEF1ZVg5Uk5Tdlo2YnlaNGFtL1JMdVZLdFRnb25ldFYxdHphM0FVaStz?= =?utf-8?B?c09aSFJtS1dZM25YMWFscEJSckttY3lFeFRzUzNvaGJ3aVE3WVo2bFh4UHNw?= =?utf-8?B?cFZiWXBQQzFqNHVuRTIvam1xeGZMOWlqcS9hbm5pQ0EzZ1Q3SDZzb3dVYStK?= =?utf-8?Q?7BUjSXyck6axOyh0=3D?= X-OriginatorOrg: fb.com X-MS-Exchange-CrossTenant-Network-Message-Id: 944b0a0e-9b86-4984-8896-08da3ac42cf9 X-MS-Exchange-CrossTenant-AuthSource: SN6PR1501MB2064.namprd15.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 May 2022 00:52:27.1242 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: KkWX0VmugxnmTVC8Qz3QW783nuxnzPLIk3/nctAt02e0aXOSS4YEHlP4klPpXiIi X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR15MB4233 X-Proofpoint-ORIG-GUID: 0lAbtFEuTWje_bcVe2bV5roQtrNtKQtC X-Proofpoint-GUID: 0lAbtFEuTWje_bcVe2bV5roQtrNtKQtC Content-Transfer-Encoding: 7bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-20_08,2022-05-20_02,2022-02-23_01 X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/20/22 9:45 AM, Tejun Heo wrote: > Hello, Yonghong. > > On Fri, May 20, 2022 at 09:29:43AM -0700, Yonghong Song wrote: >> Maybe you can have a bpf program signature like below: >> >> int BPF_PROG(dump_vmscan, struct bpf_iter_meta *meta, struct cgroup *cgrp, >> struct cgroup *parent_cgrp) >> >> parent_cgrp is NULL when cgrp is the root cgroup. >> >> I would like the bpf program should send the following information to >> user space: >> > > I don't think parent cgroup dir name would be sufficient to reconstruct the > path given that multiple cgroups in different subtrees can have the same > name. For live cgroups, userspace can find the path from id (or ino) without > traversing anything by constructing the fhandle, open it open_by_handle_at() > and then reading /proc/self/fd/$FD symlink - > https://lkml.org/lkml/2020/12/2/1126. This isn't available for dead cgroups > but I'm not sure how much that'd matter given that they aren't visible from > userspace anyway. passing id/ino to user space and then get directory name in userspace should work just fine. > >> >> >> This way, user space can easily construct the cgroup hierarchy stat like >> cpu mem cpu pressure mem pressure ... >> cgroup1 ... >> child1 ... >> grandchild1 ... >> child2 ... >> cgroup 2 ... >> child 3 ... >> ... ... >> >> the bpf iterator can have additional parameter like >> cgroup_id = ... to only call bpf program once with that >> cgroup_id if specified. >> >> The kernel part of cgroup_iter can call cgroup_rstat_flush() >> before calling cgroup_iter bpf program. >> >> WDYT? > > Would it work to just pass in @cgrp and provide a group of helpers so that > the program can do whatever it wanna do including looking up the full path > and passing that to userspace? I am not super familiar with cgroup internals, I guess with cgroup + helpers to retrieve stats, or directly expose stats data structure to bpf program. Either one is okay to me as long as we can get desired results. > > Thanks. >