Message ID | 20221221170436.252896271@redhat.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 97612C4167B for <linux-mm@archiver.kernel.org>; Wed, 21 Dec 2022 17:10:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 570528E0007; Wed, 21 Dec 2022 12:10:54 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3EEAC8E0009; Wed, 21 Dec 2022 12:10:54 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DA60A8E0007; Wed, 21 Dec 2022 12:10:53 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id C1E2B8E0005 for <linux-mm@kvack.org>; Wed, 21 Dec 2022 12:10:53 -0500 (EST) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 81A451208A5 for <linux-mm@kvack.org>; Wed, 21 Dec 2022 17:10:53 +0000 (UTC) X-FDA: 80266953186.08.4D113FD Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf17.hostedemail.com (Postfix) with ESMTP id BC4744000C for <linux-mm@kvack.org>; Wed, 21 Dec 2022 17:10:51 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=hIXCUIHH; spf=pass (imf17.hostedemail.com: domain of mtosatti@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=mtosatti@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1671642651; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references:references:dkim-signature; bh=A8ptA+mtJpfx4WDFilLLKvFD1fvtEmfC0YGkopBqCFA=; b=Ds6dJFAiAp9MuWHY0UPob+334MbYbuE1QKM718WTe44JHq7t92K0J6ZigG8YThG5cw6yXB 9elMS/PQaQbz/oBVaLtsMY0YyRpgRmhVvvx48vnGc9FeZWNjJqJMVAu3OMHHQ7eleuAxNN Ctepy9IFpb6WSojJltSJNMm9XHdWWok= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=hIXCUIHH; spf=pass (imf17.hostedemail.com: domain of mtosatti@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=mtosatti@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1671642651; a=rsa-sha256; cv=none; b=P4bhWbomdtYP0zSz8Lv27GddJUqe76s+FkZycL9uVbF5EeVW4rWXgsnaBaV0FBPbSwWQZh N79OPvRZZBGqg+7ZlWr0UZH3+L/z2D+M3ypFjfwQPtsbLPFihuPyCl9Cxipo2lo3EzbGy7 a7TYw4vhEHTniYQfbj/P2ooejnoBko4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1671642651; 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: references:references; bh=A8ptA+mtJpfx4WDFilLLKvFD1fvtEmfC0YGkopBqCFA=; b=hIXCUIHHzGe+MD85x6MH7egkv0pTriE1bsa+PbJQ98slfmBirjcq1dNYlTdFB3vckdu95h v1u4I+1teHDkgOI/7sRxXBoOqiYqj4vydI9BjRChqvKhM/wg8Td7UYerx/3sLk1XIwmQAK yXY5kG81S68iKoeu2OECmtepKTMsRNM= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-591-yibgqVRuNwCx0j0WJvOmOg-1; Wed, 21 Dec 2022 12:10:47 -0500 X-MC-Unique: yibgqVRuNwCx0j0WJvOmOg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C9029882821; Wed, 21 Dec 2022 17:10:46 +0000 (UTC) Received: from tpad.localdomain (ovpn-112-4.gru2.redhat.com [10.97.112.4]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9824B40C945A; Wed, 21 Dec 2022 17:10:46 +0000 (UTC) Received: by tpad.localdomain (Postfix, from userid 1000) id 9FC4340408D42; Wed, 21 Dec 2022 14:09:34 -0300 (-03) Message-ID: <20221221170436.252896271@redhat.com> User-Agent: quilt/0.66 Date: Wed, 21 Dec 2022 13:58:02 -0300 From: Marcelo Tosatti <mtosatti@redhat.com> To: atomlin@atomlin.com, frederic@kernel.org Cc: cl@linux.com, tglx@linutronix.de, mingo@kernel.org, peterz@infradead.org, pauld@redhat.com, neelx@redhat.com, oleksandr@natalenko.name, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Marcelo Tosatti <mtosatti@redhat.com> Subject: [PATCH v11 1/6] mm/vmstat: Add CPU-specific variable to track a vmstat discrepancy References: <20221221165801.362118576@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Stat-Signature: f4x9ea8xfk3j64n343ogiejawiyf1x4x X-Rspam-User: X-Rspamd-Queue-Id: BC4744000C X-Rspamd-Server: rspam06 X-HE-Tag: 1671642651-248433 X-HE-Meta: U2FsdGVkX19HNDSV8liTxbXa+Z54Wdma2FnootABlwtkHX0rhdSJ9ho2lZEdKOObefqjhEUZD3+jr2lel6b1T+V5vrNJU0H0U77CMjsibU4g4P3b/hrAKrZQEFEsjzSeqWyYHsAZtM5GBmZyE/ZEs1siFbuupO5WGQbaSMVkiyeLMo0Foez5AdWx5UpmQSMEOQsLR1GmkqGb8JzqYrIvU59OxUb++NSWjdm/SPGhTcKukA2JIksrJCBKE0fJJregTMU7g7R0W89DVgLVLAMcIzIq1LD9/5Nh6zxR7zxyHty9XkrfegRWKYRHQagpYX9Ixv4OO/ncpPr38cWljsLDm23/J8AXlWU7OTzyMHiTnbwd1NO5v6A+7RBCoQ1C4QRieyjTR927KfQCAND9QawUGJvoy9y6xXa+8QBf7vO6qJ3EuW47Vt8k2ggTjZFQJ6uhYZDMUYEbP+sb8T4a5UJMHqTKIHMviYAdtcANrmqA4pXvuzLmJMMOtciuXWQ9prK4XOngl7b3O4N6s+f9KhWp00d3+zvpkPyNeb/74ql4HmdI2xnw9VdI69SIB6PATooN4BxNoq517KThr5DsgRM2HvmG3rB+X2Rq7/c3Djzxuov/FM6nn0IdaIyGsjbLabvMdgvhxYm14Ab9JdnTrGTf/dnhPV+YmWmuj2oS7n0Zp8d0w+xQbGQDPoWUsD0YUDsgDyyEcMKp4EWYk9PZ2z/cUdvb/QuS5Gz6/JZjCxmYp382SabeBY6iwloUrJgvvb6DEGRoIKON4wVRa1B7uEobr2cBQYfgY1X1THEHpFSlEPQQr6QqulbF17kqch57zldqhSDQ+eNlaOSg/rWpXSOfh1vXzxmugqs82OQik4rGWbQs9PYdBaF63y+bJ780LsWb 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: <linux-mm.kvack.org> |
Series |
Ensure quiet_vmstat() is called when returning to userpace and when idle tick is stopped
|
expand
|
Index: linux-2.6/mm/vmstat.c =================================================================== --- linux-2.6.orig/mm/vmstat.c +++ linux-2.6/mm/vmstat.c @@ -194,6 +194,22 @@ void fold_vm_numa_events(void) #endif #ifdef CONFIG_SMP +static DEFINE_PER_CPU_ALIGNED(bool, vmstat_dirty); + +static inline void vmstat_mark_dirty(void) +{ + this_cpu_write(vmstat_dirty, true); +} + +static inline void vmstat_clear_dirty(void) +{ + this_cpu_write(vmstat_dirty, false); +} + +static inline bool is_vmstat_dirty(void) +{ + return this_cpu_read(vmstat_dirty); +} int calculate_pressure_threshold(struct zone *zone) {