Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp457638pxv; Fri, 9 Jul 2021 01:46:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBEo51LCHUcJoBSeM/12cjFDWX51juTh7cIy2ISgdH7ozsPjLdzcQeH+5Y3LE3ty4J3jrj X-Received: by 2002:aa7:cc87:: with SMTP id p7mr44014106edt.82.1625820386049; Fri, 09 Jul 2021 01:46:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625820386; cv=none; d=google.com; s=arc-20160816; b=cYy06Y0KouI+NUDUbiyIWZnXay4Zzk+eKNMw4etlpdJio+bQAC4JFfutDbrb0/rheC fAl3qrrw7hReKPAYTvuRfGUZu5Sg/ivWFSO/1MiJnhsgvO79pqmiJNWNCGIIlhBJxT1t wY37oqewo2ZmtKB0KdYZbB8mTsgv6fuEzpUUmizqxaqfvh/5MU0Mg52awFnF02MIW7jI DMee1+d1tSwLH0DMCRSiW5TTy6jfZiAAnaQSl8eCjWdS+E/hwJ5BdnaUJOU6sNMoUEq/ 4yYTImh0IquIRu/mietztKvfEAwtbXOKcx6Ts5Pom/mC/eECnGkVFpc3WrpJf9boSgqo Ax5Q== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=XM/z44pNmFHrLarAG7q4/FJe87E5krB2qr3jPSfprIA=; b=NHcT3Pyaq8LuQbDHd0jwS5EYrG+nRaHb+QVG++csuxmHG7I1lRs3x1J4Sa/SM5GCj2 ju6fHAFNGG1x4253nSRTntTr3Pzsd9gQfQQBbzSFHqBdmAQbaINLwuK7ngZuxhOARVAD MZ/7/bPL06qFaXadm3zxx8Tkauv6o7u1HjGnciGdNYAO/uHuFMp0ipgRRuLZmK9R/U3V /3HFI6jZNIVfHOmZEmbsg8b8oZVSebgGNqgANQonrAfHtUTaXORQE4qExhl/2OcB6C3f ixf5qH3u+XJflqejcq86lwsf716g27DSu4Z8l1UQaHp/gHdBMHWXCre5n/JGSuD9tOSa Qfkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AG0dH8uK; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y20si5966575ejr.227.2021.07.09.01.46.03; Fri, 09 Jul 2021 01:46:26 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b=AG0dH8uK; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231519AbhGIIpt (ORCPT + 99 others); Fri, 9 Jul 2021 04:45:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:50508 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231494AbhGIIpt (ORCPT ); Fri, 9 Jul 2021 04:45:49 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AE5566135E; Fri, 9 Jul 2021 08:43:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625820186; bh=0cImG1X5ufWqEnPoqRKQx45VH1j1qXZqLZOS8MvKO7k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AG0dH8uKQ3h/dsgJoiy2tOZ+JYL4upetQCIjFcX2TdjaYO6mmM/WEWT8zCStuBl5D 080Ye2u8yItVTb2xFzzdckltPpdJnD9fsqltTbZkrg5xxxLFt/p0LThaMD02jEdZfy +u8xALybFuIunnIPSr8/TJupvC3ZBDXbyEWi54j/KFHQiQDQ0+AdxGl5EgASHHddos 9ktJMdmu0Gy4rFu9zXk/kdSDrHH+xrqSY0QSQ4HauLWqGgCpbT0w0gIn2NN/MZMXZ0 JjGMIVFZUxvi0xJ9jdKNn9m/EY5fdOOtjttHhcMsl4dKqQsnmHcQsHF2hjm95HMIdZ vjQwvtpIUpd1g== Date: Fri, 9 Jul 2021 10:43:03 +0200 From: Frederic Weisbecker To: He Zhe Cc: anna-maria@linutronix.de, linux-kernel@vger.kernel.org, tglx@linutronix.de Subject: Re: [PATCH v2] timers: Recalculate next timer interrupt only when necessary Message-ID: <20210709084303.GA17239@lothringen> References: <20200723151641.12236-1-frederic@kernel.org> <20210708153620.GA6716@lothringen> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 09, 2021 at 01:37:11PM +0800, He Zhe wrote: > > > On 7/8/21 11:36 PM, Frederic Weisbecker wrote: > > On Thu, Jul 08, 2021 at 02:43:01PM +0800, He Zhe wrote: > >> Hi, > >> > >> Ever since this commit merged in, when nohz_full enabled, the counts of arch_timer interrupt on arm64 arches keep increasing on cores that have been isolated. This can be reproduced on several arm64 boards. After reverting the commit, the counts would stop increasing after boot. my .config is attached. > >> > >> root@qemuarm64:~# uname -a > >> Linux qemuarm64 5.13.0 #1 SMP PREEMPT Mon Jul 5 07:11:27 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux > >> root@qemuarm64:~# cat /proc/cmdline > >> root=/dev/vda rw? mem=2048M ip=dhcp console=ttyAMA0 console=hvc0? earlyprintk isolcpus=1-5 nohz_full=1-5 rcu_nocbs=1-5 > >> root@qemuarm64:~# cat /proc/interrupts > > And I'm not observing that on default aarch64 on qemu either. > > Are you emulating a specific machine? > > Here is my qemu configuration. > > qemu-system-aarch64 --version > QEMU emulator version 6.0.0 > Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers > > qemu-system-aarch64 -device virtio-net-device,netdev=net0,mac=52:54:00:12:35:02 -netdev user,id=net0,hostfwd=tcp::2222-:22,hostfwd=tcp::2323-:23,tftp=/qemuarm64 -object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0 -drive id=disk0,file=/qemuarm64/qemuarm64.rootfs.ext4,if=none,format=raw -device virtio-blk-device,drive=disk0 -device qemu-xhci -device usb-tablet -device usb-kbd? -machine virt -cpu cortex-a57 -smp 4 -m 2048? -smp 6 -m 2048 -serial mon:stdio -serial null -nographic -device VGA,edid=on -kernel /qemuarm64/Image.bin -append 'root=/dev/vda rw? mem=2048M ip=dhcp console=ttyAMA0 console=hvc0 earlyprintk isolcpus=1-5 nohz_full=1-5 rcu_nocbs=1-5' > > > > > Can you enable the following trace events and send me the output from > > one of the isolated CPU trace, say CPU 3 for example: > > output_to_send is attached. > I can confirm that during the sleep the count of arch_timer increases one on > each isolated core. Oh that's the trace from CPU 0, precisely the only one I don't need :o) It's my fault, the last line of the script should have been: cat $DIR/per_cpu/cpu3/trace > ~/output_to_send Sorry...