Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp22859rdf; Mon, 20 Nov 2023 14:59:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IE+4t90SZLqBYK2Nfyl9xBjcipO40fqypnm9h0VIKVqWBWHwKgoFWQcC7H8SJ9ILeOq5H69 X-Received: by 2002:a05:6830:138b:b0:6d6:4c28:5579 with SMTP id d11-20020a056830138b00b006d64c285579mr9679358otq.8.1700521195119; Mon, 20 Nov 2023 14:59:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700521195; cv=none; d=google.com; s=arc-20160816; b=MLfXEm4l0g9WdBRjYLsIE1VcbW+XwiyFCp4/Sm79J5ksHdqU7/CnD7ktCr70kZgM/q xz0TQECBQb4LScWaGNzxsLbHFmy1wDtjIYikFeWEsG+9/F+nhOZb9l3IO5jl/Bv/6ZSh LDIBIt8b6rtqoChLVp6CLJSnAuL5cYyTKbReCwYbpkO0DzB8IaW3+dqNmX43MpHi/R1H IDsLUYj4eIfBa1rwcDl+CkLctFyh+DipRztGvVplx/5YZt4hp8JczosC+lXWbmkKFD1U VRNdAJF8tthrucTbOgsgM193fhZAQgiI/UiPTaph7TSJJx8w/kArfm/dx5csYpvlL9XM I81A== 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=XDKGl/7+RX9SGYK6KbFJip0QeJy9c9kty6XXgwXAziw=; fh=hNvdJZAwo7NtrTFMth4A6Wl9yaOAsBCUQ4Lipez2z1E=; b=CLhEXcQKkJ7ZENCj3gaUrdXkTvuSlkr5NIG4HSiMdopKom3YpAOF6zJfQEEJVCGlLy 11Z5g2PI15DjQgoiNWNYXsCO2iS039GYmH4ELaYmbubfwViMzpchbOhMfC2A4896oqJm U85leKTQhQr1v5uIPiXTvqXEi1+7JRGtfAELJYe3Hn+QRZLT+6UUfDeiowwFTIGdCx46 arcChUF33+pnOsIPy/vnBfgm4mwleGAhbFjGE3UY7SZEvVC2Fmev4QjWH0yvqND6fnzu zxs5tkCznAwnIb8MOZHPw0MxaaLDcKxvQLUrRItfDQvL/z9Frt3y7GEO6/HRNjQx3Wx9 go3w== 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:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id f22-20020a635556000000b00578cc8d2599si8455680pgm.211.2023.11.20.14.59.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 14:59:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id 2239480D44D0; Mon, 20 Nov 2023 14:59:36 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229496AbjKTW7e convert rfc822-to-8bit (ORCPT + 99 others); Mon, 20 Nov 2023 17:59:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229448AbjKTW7d (ORCPT ); Mon, 20 Nov 2023 17:59:33 -0500 Received: from mail-oa1-f52.google.com (mail-oa1-f52.google.com [209.85.160.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D8B7A2; Mon, 20 Nov 2023 14:59:30 -0800 (PST) Received: by mail-oa1-f52.google.com with SMTP id 586e51a60fabf-1e9c9d181d6so3036125fac.0; Mon, 20 Nov 2023 14:59:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700521169; x=1701125969; 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=4dZP1CpgWwT6/Z66YkAUxS5DUl+N3kpH1NW1HsPopb8=; b=Qt38cGYsWK6Ew6N3ZLimPQFW2CewaJQACJzy/crNcX/3QaB7ULmSdXCSfVW+9QQOmw ioiNHmhyMuRswX0Dyd6DOeP9ZE0aSNo466T6+fPppQl0564k7Y4ZWHI1TgONTF3ukhIu mUUgdWPvH2BDix4PP289QBQLadk+btViSs/k3E+ta/7TTcjOM/0en7Sbk5xifGvnHeDn ThxdKbaWSyPFQ8jnCRrGERN/Tedf8BZbDlhFyWGwvvZdHbRAa/hcH/seLrwZ3XmzkjkX f+BcOI+6ws335nPFmB2OGrTlhKnz7aIOH3+OUdLZqivZX96VM4L7AeHOqhQIQllbw3tG z9Fg== X-Gm-Message-State: AOJu0YzF2NhsTrx6RkWf+ceVUIa3XDkUw2OC6aLImA2f+XzjhmdQT3fy spGvWQ/H2otjvjB2sr8Q26ZK0uACfwSu8TW5vPYKPEBH X-Received: by 2002:a05:6871:22c7:b0:1f9:4afd:e3c9 with SMTP id se7-20020a05687122c700b001f94afde3c9mr3570756oab.1.1700521169416; Mon, 20 Nov 2023 14:59:29 -0800 (PST) MIME-Version: 1.0 References: <449fb8d2.27fb.18bcc190021.Coremail.00107082@163.com> <76d75357.6ab6.18bce6b7d5b.Coremail.00107082@163.com> <20231115103241.GD3818@noisy.programming.kicks-ass.net> <407a06f8.632a.18bd2a2ece1.Coremail.00107082@163.com> <1a1338d0.6b3a.18bd3c09056.Coremail.00107082@163.com> <489ecb9e.28cc.18bd650affa.Coremail.00107082@163.com> <1da1b7f.564.18be01bd6ce.Coremail.00107082@163.com> In-Reply-To: <1da1b7f.564.18be01bd6ce.Coremail.00107082@163.com> From: Namhyung Kim Date: Mon, 20 Nov 2023 14:59:18 -0800 Message-ID: Subject: Re: [Regression or Fix]perf: profiling stats sigificantly changed for aio_write/read(ext4) between 6.7.0-rc1 and 6.6.0 To: David Wang <00107082@163.com> Cc: Peter Zijlstra , 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.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 20 Nov 2023 14:59:36 -0800 (PST) On Fri, Nov 17, 2023 at 5:48 PM David Wang <00107082@163.com> wrote: > > > At 2023-11-18 05:11:02, "Namhyung Kim" wrote: > >On Wed, Nov 15, 2023 at 8:09 PM David Wang <00107082@163.com> wrote: > >> > > >> > >> > >> From the data I collected, I think two problem could be observed for f06cc667f79909e9175460b167c277b7c64d3df0 > >> 1. sample missing. > >> 2. sample unstable, total sample count drift a lot between tests. > > > >Hmm.. so the fio process was running in the background during > >the profiling, right? But I'm not sure how you measured the same > >amount of time. Probably you need to run this (for 10 seconds): > > > > sudo perf record -a -G mytest -- sleep 10 > > > >And I guess you don't run the perf command in the target cgroup > >which is good. > > > > Yes profiling process was not in the target cgroup. > I use fio with `fio --randrepeat=1 --ioengine=libaio --direct=1 --name=test --bs=4k --iodepth=64 --size=1G --readwrite=randrw --runtime=600 --numjobs=4 --time_based=1` which would run 600 seconds. > There would be drifts in the profiling report between runs, from those small samples of test data I collected, maybe not enough to make a firm conclusion, I feel when the commit is reverted, the expectation for total sample count is higher and the standard deviation is smaller. > > >And is there any chance if it's improved because of the change? > >Are the numbers in 6.7 better or worse? > > > I have no idea whether the change of expected total sample count a bug or a fix, but, the observed result that total sample count drift a lot (bigger standard deviation), I think , is a bad thing. Right. Can you run perf stat to measure the number of context switches and cgroup switches, then? sudo perf stat -a -e context-switches,cgroup-switches -- sleep 10 Thanks, Namhyung