From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5863BC433EF for ; Thu, 31 Mar 2022 14:33:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 69DC56B0072; Thu, 31 Mar 2022 10:33:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 64BD76B0073; Thu, 31 Mar 2022 10:33:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4ED016B0074; Thu, 31 Mar 2022 10:33:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.28]) by kanga.kvack.org (Postfix) with ESMTP id 3E63A6B0072 for ; Thu, 31 Mar 2022 10:33:17 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id 0A80D619E2 for ; Thu, 31 Mar 2022 14:33:17 +0000 (UTC) X-FDA: 79304924034.05.14C96EE Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf07.hostedemail.com (Postfix) with ESMTP id 3A4704000B for ; Thu, 31 Mar 2022 14:33:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1648737195; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=PCSbQr6xvWn8hoYvS5YW2D5+aEPHScZTxNMPCPMZ7KE=; b=T/xJZv6j5PeSOmJI6IRSNwScvqIQsy5N0iujwz78AJU1ULf9x86ftP155sr30Bk2cEfb44 yZHFsMKUMrp8iSMqterI06bpjcQZ3pAc21UR3Z1/lfmhYQ5lxma+mwMWpA0f8nh3CNqvop l5QdRKZmXjyuxWh1HqR2qIK/QkQljOs= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-224-mHpq3mCROImcmSUpwoZDAQ-1; Thu, 31 Mar 2022 10:33:14 -0400 X-MC-Unique: mHpq3mCROImcmSUpwoZDAQ-1 Received: by mail-wr1-f72.google.com with SMTP id 5-20020adf8105000000b002059d8f085bso27013wrm.0 for ; Thu, 31 Mar 2022 07:33:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=PCSbQr6xvWn8hoYvS5YW2D5+aEPHScZTxNMPCPMZ7KE=; b=s8kEe3x6qjX+8bw3JOw3I5CWAs8KPmTapvZaVzoCRsOBtsjeRyK2xsZ1n2JBzPAL4e dsQ6dk7FOWbRzm2sNn1sv4BxbV13gP/luLITt4k0ZcWKMWs+IUAWpG20WLL+KFUPy+NV wY9UJt/VtEe7iHyfCO/YOdIiDA1Zmgq78Pxr5S4UyylVaD4C06kkCoNc/o4nG39w/LvC 5a2+JtVWzDIy7pK/wX3p+2pYpz+9rLSQuNiUChTvVCaRJPhd78b1nvBMcNZJIAEsdB7L jXcKaBBes/XdaHJmYdeQQFHoRG0QXJH5uEuK6yQUpktCOOr0tPXXMf7LDmBPwQ02aaqh ExoA== X-Gm-Message-State: AOAM532pEUpcoKIRJJ/b3WTPFFk88W9miluuLg8RhtsP/LbscI0GG9oZ NUELRKGs0duUMjn0/zMfOzkO5UmO/QCvan3oDuPOhBg84UpBSvPqHPYmvJT1AsLQDtqgvw//gFQ W+N0gSSCncg== X-Received: by 2002:a5d:6484:0:b0:205:8a53:f365 with SMTP id o4-20020a5d6484000000b002058a53f365mr4335869wri.121.1648737193230; Thu, 31 Mar 2022 07:33:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGMXY7sBuPd9yAeY8pTRD2a8bEE8tmyiCLp9R8jU86g/AB/ez6PndB+arGWU39QAEbGiqygA== X-Received: by 2002:a5d:6484:0:b0:205:8a53:f365 with SMTP id o4-20020a5d6484000000b002058a53f365mr4335859wri.121.1648737193001; Thu, 31 Mar 2022 07:33:13 -0700 (PDT) Received: from localhost (cpc111743-lutn13-2-0-cust979.9-3.cable.virginm.net. [82.17.115.212]) by smtp.gmail.com with ESMTPSA id 7-20020a05600c028700b0038cc9bfe6a4sm7054074wmk.37.2022.03.31.07.33.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Mar 2022 07:33:11 -0700 (PDT) Date: Thu, 31 Mar 2022 15:33:10 +0100 From: Aaron Tomlin To: Frederic Weisbecker Cc: Aaron Tomlin , Marcelo Tosatti , Christoph Lameter , tglx@linutronix.de, mingo@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Phil Auld Subject: Re: [RFC PATCH] tick/sched: Ensure quiet_vmstat() is called when the idle tick was stopped too Message-ID: <20220331143310.vhsnywx3z7obdycf@ava.usersys.com> X-PGP-Key: http://pgp.mit.edu/pks/lookup?search=atomlin%40redhat.com X-PGP-Fingerprint: 7906 84EB FA8A 9638 8D1E 6E9B E2DE 9658 19CC 77D6 References: <20220203214339.1889971-1-atomlin@redhat.com> <20220217124729.GA743618@lothringen> <20220217142615.xqtiydixvnumyvei@ava.usersys.com> <20220217163205.GA748087@lothringen> MIME-Version: 1.0 In-Reply-To: <20220217163205.GA748087@lothringen> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 3A4704000B X-Rspam-User: Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b="T/xJZv6j"; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf07.hostedemail.com: domain of atomlin@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=atomlin@redhat.com X-Stat-Signature: u1fybju5dkf8nfde9irbtt3d5fo7u8xh X-HE-Tag: 1648737196-57186 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu 2022-02-17 17:32 +0100, Frederic Weisbecker wrote: > Then I can see two other issues: > > 1) Can an interrupt in idle modify the vmstat and thus trigger the need to > flush it? I believe it's the case and then the problem goes beyond nohz_full > because if the idle interrupt fired while the tick is stopped and didn't set > TIF_RESCHED, we go back to sleep without calling quiet_vmstat(). > > 2) What if we are running task A in kernel mode while the tick is stopped > (nohz_full). Task A modifies the vmstat and goes to userspace for a long > while. > > Your patch fixes case 1) but not case 2). The problem is that TIMER_DEFERRABLE > should really be about dynticks-idle only and not dynticks-full. I've always > been afraid about enforcing that rule though because that would break old > noise-free setups. But perhaps I should... Hi Frederic, Firstly, apologies for the delay. In reference to case 2: If I understand correctly, even if TIMER_DEFERRABLE is removed refresh_cpu_vm_stats() cannot be invoked since the scheduling-clock tick is disabled i.e. non-deferrable timers are serviced by the tick, no? So, the only option would be to interrupt the workload - not desirable - or detect any remaining differentials prior to entering userspace? Kind regards, -- Aaron Tomlin