Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp2895815rwl; Fri, 6 Jan 2023 12:22:18 -0800 (PST) X-Google-Smtp-Source: AMrXdXvz6W4GvJRjrDAzJv2vwelUjpValS5wsurpamVV28kcgPvgvIr4voV3radn0MW7n08h6Aej X-Received: by 2002:a05:6402:e83:b0:45c:a5f2:ffea with SMTP id h3-20020a0564020e8300b0045ca5f2ffeamr68140340eda.7.1673036538616; Fri, 06 Jan 2023 12:22:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673036538; cv=none; d=google.com; s=arc-20160816; b=eOONIoI/bFs2sFfJj1QxBsRatn3Ui0vCUTv5vFo+2zNQx4wwJqAhxekXzgZYuu+sL0 QXo2c7oxdZxe4eqHMMhk6DOmSRCnIX9iGsHkkcXUq1JvdFc/yRi51p9ttcgV08Rd+xdr ItjIM+vnuBulsdZk3XUHiuVwOpl5li5cMXPWNXHD5wQoM/YFCIOuqlaWG1jcYMGHY+7e B53KzdNrcqp8yzW4i6+pD6rL29qTcNhVwPOnyGTCThXyCAwp1MGYmFia4D4hofRdp9dV eYrBVkzut9+bkxp2WRUuam0OzsPx/UXP4aEbkgo6X47NH4lEK8uOPpj4QXILwu6lRfhx P1og== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=782xKD92TRBAnQZNDD+gjmN9QEeCF70KQdy4tyYVbXE=; b=VoQEm2ubKNKhBZ8h4HAU0DrInqjVqEYMDgXPJNrw9aLy1EJiw8tdHEVhMRjlnw5MgH xdz7gnT/DkvE1rGSlO4M7VJnFoegkA1yoeoTdPF0Iey3eRJPumMCF8892MrK6luM+kIC FqY4E7CP//FPBCMYhdpGkxsLtE+EQ3CHYOP87gHAwN6/uO4OCn/rxn6YuFhYm59JegNY WBw5zqAzvuLCWA7MXR6rQEmEoYjF8MO5LEemfNzYVQsAat69j/+UDTGKnU4CgVP4+lv1 DO5qs7Oy1Tt9qF2bfsjpwGxXrNaJq/g2Xjh0o/VpygLnvz6RxYULnf3sUF2U5tGS7N6S EByg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=jAq+EhWp; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s10-20020a50ab0a000000b004697dff9638si2537823edc.87.2023.01.06.12.22.04; Fri, 06 Jan 2023 12:22:18 -0800 (PST) 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=@redhat.com header.s=mimecast20190719 header.b=jAq+EhWp; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236161AbjAFUH6 (ORCPT + 55 others); Fri, 6 Jan 2023 15:07:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236145AbjAFUHu (ORCPT ); Fri, 6 Jan 2023 15:07:50 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AFD441678 for ; Fri, 6 Jan 2023 12:07:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673035620; 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=782xKD92TRBAnQZNDD+gjmN9QEeCF70KQdy4tyYVbXE=; b=jAq+EhWplkMo8JqwQBxrI63AqZobF4pM0/K8lzbCEyrjujV+faf/05g96NvA/WoIYFTrYB pwiUpmyrPIy85tM+z+of6dk+0wKEOG8bCcxwgiDL9Zv/KSNiBoW4dkDo6rR8rvfvazjOGR LXJ48TEVBn6uYxnMWdMDXWZfy8Cfbik= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-652-n3xa0o0KNtq6AzivjTnSgQ-1; Fri, 06 Jan 2023 15:06:57 -0500 X-MC-Unique: n3xa0o0KNtq6AzivjTnSgQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D0DA03C0253D; Fri, 6 Jan 2023 20:06:56 +0000 (UTC) Received: from tpad.localdomain (ovpn-112-2.gru2.redhat.com [10.97.112.2]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 70A611121314; Fri, 6 Jan 2023 20:06:56 +0000 (UTC) Received: by tpad.localdomain (Postfix, from userid 1000) id 1072E401B7EC8; Fri, 6 Jan 2023 15:16:23 -0300 (-03) Date: Fri, 6 Jan 2023 15:16:23 -0300 From: Marcelo Tosatti To: Hillf Danton Cc: atomlin@atomlin.com, frederic@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v13 3/6] mm/vmstat: manage per-CPU stats from CPU context when NOHZ full Message-ID: References: <20230105125218.031928326@redhat.com> <20230106001244.4463-1-hdanton@sina.com> <20230106150154.4560-1-hdanton@sina.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230106150154.4560-1-hdanton@sina.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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 Fri, Jan 06, 2023 at 11:01:54PM +0800, Hillf Danton wrote: > On 6 Jan 2023 09:51:00 -0300 Marcelo Tosatti > > On Fri, Jan 06, 2023 at 08:12:44AM +0800, Hillf Danton wrote: > > > > > > Regression wrt V12 if timer is added on the CPU that is not doing HK_TYPE_TIMER? > > > > Before this change, the timer was managed (and queued on an isolated > > CPU) by vmstat_shepherd. Now it is managed (and queued) by the local > > CPU, so there is no regression. > > Given vm stats folded when returning to userspace, queuing the delayed work > barely makes sense in the first place. If it can be canceled, queuing it burns > cycles with nothing earned. Otherwise vm stats got folded already. Agree, but you can't know whether return to userspace will occur before the timer is fired. So queueing the timer is to _ensure_ that eventually vmstats will be synced (which maintains the current timing behaviour wrt vmstat syncs). Also don't think the queueing cost is significant: it only happens for the first vmstat dirty item. > Nor does shepherd even without delay. And the right thing is only make shepherd > leave isolated CPUs intact. > >