Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3931359imw; Mon, 18 Jul 2022 17:45:44 -0700 (PDT) X-Google-Smtp-Source: AGRyM1twwWVsiZrushMzwm8xcmTHGTuKIcmHVP9iSRQ+3XO/OiYtNDVcM7yxGQR/A6iiU94hCD0e X-Received: by 2002:a05:6402:5245:b0:43a:a024:82cc with SMTP id t5-20020a056402524500b0043aa02482ccmr40611742edd.56.1658191544282; Mon, 18 Jul 2022 17:45:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658191544; cv=none; d=google.com; s=arc-20160816; b=J/q9E8CxcgSn7eypVA01xRZD7uZ+AK+snjDs34WQsdoAWf1RcZyMeG1b1KeApn1Oys qofwTyHFINCmjExzUWPsk2SBouDxn9haQLIbfUVcBh/atyQ7XsksHD+lR4sbLu3O/E9d ookijg1XhQoPuNS93v4fIuVuPw4edAunUD55QqU7Aqg71c0eStPy5vTcv/1NaCmAbjJ4 6roL4CXlWTzemwtKnk4VDkcFy/6PJonRrBC6YRlItz/+GoTz4yBRvNZdH6DlGGzp+7Bo BT+ec/DqhZTJbR1bnSwTTuzj+yfRmjsqU8U+47JFo37VIV/q0lr5M98IqpAS0JFUentP zGWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=A/tfmTl8rXDFpYRGXN4+L+UsANM+7IsYT4VqGSMDHfM=; b=KX05zX1R1fBvbu+hhnmRx5YOZsbUl+e4JyyZatRx1n6ac5dUFFcyrWXRRQFwVmzXMb x5+KDSm5avFRYqcwS/HwgiO0mVWogJlwBe10wSAWvgh+2RPhhjn8w0Xb9VfvRITbhSdj y7ymfDglSM+z2JdqJK0nJfO8zW+d9ZiURri/8Ypq7PiuqG5x7pGF+XMvdG1KBb8848ou MrHS0AoRjD0SONIc4jhmrfosqbtSRGNeaVVecTRGivc9jCJth5oYs34vcUvdRz6c8z19 3E9AtLj++urPCmIlvQsY1tdd/en/QgzdqS3r++HDoRRNw82DlySGg8OwKaXmXXvEQUkC bRdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=YsSa6Gug; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g6-20020a1709065d0600b0072f09e7093fsi13431575ejt.141.2022.07.18.17.45.19; Mon, 18 Jul 2022 17:45:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=YsSa6Gug; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236754AbiGSATr (ORCPT + 99 others); Mon, 18 Jul 2022 20:19:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235594AbiGSATp (ORCPT ); Mon, 18 Jul 2022 20:19:45 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD5F133437 for ; Mon, 18 Jul 2022 17:19:43 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id a5so19307762wrx.12 for ; Mon, 18 Jul 2022 17:19:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=A/tfmTl8rXDFpYRGXN4+L+UsANM+7IsYT4VqGSMDHfM=; b=YsSa6GugGINKY6fPTPL9pliswrcB1UYTnSQSyvHufKXAKsnNqjgbZf/MrzBAVFkpkV 3efUWwnPZNgyam4zbFiZvkF6DwmWKFdS4gCpQebSh57I/6VOBjSSfsjowVXVPiw71gNH de+i+jDRoJXPnuWcTFjPOCu7w5EYVFWAUjK8xRxu3vg0KbHaPYzSIuS0CLG8vyC+lneJ h4Ng6A/IL8PySfzmZtqDJZ+vkSLiZB+gEobBhwgUXPRZxEZxNCQ3mkTA+krKy7w5UpLY vLso/ZSSkedxwIUPkoCsvkpFvozIoqB8yMpsstKN1pibqE18Si1uau6Mu0kK3kRsror3 2GFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=A/tfmTl8rXDFpYRGXN4+L+UsANM+7IsYT4VqGSMDHfM=; b=H90OZSuN9ALc23f2jkVi5KnMgEU2zwwAT9XFt5j3SJOx6AMnqcHCR+Pb9AtfMTj6JP nZBlaN5BsG/TnuPUm9Mia2Yj3dOZeHtcDxgpx+wagsOYkARpIk8tuXFOGE+kaEc87m4s /zsfAPm90mieEapkwAJvR/BkyINRCu8Wtt8FiGgWSugmt6sya6L5NICfaY7SLTCnjkWS M4jEgDDzSeQi7CjMhQTu3NXpKT3ERrYQGsPtUXIQ9+R/URpcn4gHwjAJaw3i9SzM/FGU ZPIS9x29V7QXk76hQhgFCwtIBa/AAbRg8Ej8YlLDUGiJLEPBKVwxv838GlwvJ3tkBdhY PD+A== X-Gm-Message-State: AJIora+5usuw7Z4thk9k/zRiQ35SZl99oFhulQ+mV9DpBEvxm90SkglP 060otMkMyj9ZuDYO2HljcYpc86+QjmKPCi1FUSe3Eg== X-Received: by 2002:a5d:64a3:0:b0:21d:adaa:ce4c with SMTP id m3-20020a5d64a3000000b0021dadaace4cmr24585254wrp.161.1658189982235; Mon, 18 Jul 2022 17:19:42 -0700 (PDT) MIME-Version: 1.0 References: <20220709000439.243271-1-yosryahmed@google.com> <20220709000439.243271-9-yosryahmed@google.com> <9c6a0ba3-2730-eb56-0f96-e5d236e46660@fb.com> In-Reply-To: From: Hao Luo Date: Mon, 18 Jul 2022 17:19:30 -0700 Message-ID: Subject: Re: [PATCH bpf-next v3 8/8] bpf: add a selftest for cgroup hierarchical stats collection To: Yosry Ahmed Cc: Yonghong Song , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Tejun Heo , Zefan Li , Johannes Weiner , Shuah Khan , Michal Hocko , KP Singh , Benjamin Tissoires , John Fastabend , =?UTF-8?Q?Michal_Koutn=C3=BD?= , Roman Gushchin , David Rientjes , Stanislav Fomichev , Greg Thelen , Shakeel Butt , Linux Kernel Mailing List , Networking , bpf , Cgroups Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham 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 Mon, Jul 18, 2022 at 12:34 PM Yosry Ahmed wrote: > [...] > > I think I figured this one out (the CI failure). I set max_entries for > the maps in the test to 10, because I have 1 entry per-cgroup, and I > have less than 10 cgroups. When I run the test with other tests I > *think* there are other cgroups that are being created, so the number > exceeds 10, and some of the entries for the test cgroups cannot be > created. Using hashmap to store per-cgroup data is only a short-term solution. We should work on extending cgroup-local storage to tracing programs. Maybe as a follow-up change once cgroup_iter is merged. > in the bpf trace produced by my test, and the error turned out to be > -E2BIG. I increased max_entries to 100 and it seems to be consistently > passing when run with all the other tests, using both test_progs and > test_progs-no_alu32. > > Please find a diff attached fixing this problem and a few other nits: > - Return meaningful exit codes from the reclaimer() child process and > check them in induce_vmscan(). > - Make buf and path variables static in get_cgroup_vmscan_delay() > - Print error code in bpf trace when we fail to create a bpf map entry. > - Print 0 instead of -1 when we can't find a map entry, to avoid > underflowing the unsigned counters in the test. > > Let me know if this diff works or not, and if I need to send a new > version with the diff or not. Also let me know if this fixes the > failures that you have been seeing locally (which looked different > from the CI failures). > Yosry, I also need to address Yonghong's comments in the cgroup_iter patch, so we need to send v4 anyway. Hao > Thanks! > [...]