Message ID | 20230515180138.591710284@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 8CF8EC7EE24 for <linux-mm@archiver.kernel.org>; Mon, 15 May 2023 18:04:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5054790000A; Mon, 15 May 2023 14:03:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3EEC990000F; Mon, 15 May 2023 14:03:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0427990000A; Mon, 15 May 2023 14:03:54 -0400 (EDT) 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 D90C790000D for <linux-mm@kvack.org>; Mon, 15 May 2023 14:03:54 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id AFC82121406 for <linux-mm@kvack.org>; Mon, 15 May 2023 18:03:54 +0000 (UTC) X-FDA: 80793262788.22.BB432AD Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf05.hostedemail.com (Postfix) with ESMTP id 4100210007E for <linux-mm@kvack.org>; Mon, 15 May 2023 18:03:46 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=f8Orl0+r; spf=pass (imf05.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=1684173826; a=rsa-sha256; cv=none; b=O32c8koWd347rRcNPhpsisUD2z81F1Jj5Y5HY9xH7E/LwbSHSM5GQAIZumIVg2hT1nnckM omVf6MgmZjLtIpfUnUBsSPSo2FKOLCFbnWkxwcFVuXw8BBjGv0ujhqWwdcyb3PZ4eSvJRW koxKsN9y1fGRnnWmlAZdeBO5YCWjSTQ= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=f8Orl0+r; spf=pass (imf05.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=1684173826; 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=BJ6i2oDSiY3YdcuHRj+4qVRIpmZay1wZiVJ33jyxj48=; b=pgfBeOjltkXodJH2FLWsZvVBqV+ZuhG/SfUPdSIjjZuHzcTDuupzK7fTRwzXVa19wZ9U9C fmVUTE7Zv3JZLjKhc7cJA163oPqCG9U6CVJbiIv9+VMo/fmTUxWaogmjaiTzEp8Rnla4l2 WxxDImaU7Ob/aoKWWhyOHck5RiuwERI= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684173825; 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=BJ6i2oDSiY3YdcuHRj+4qVRIpmZay1wZiVJ33jyxj48=; b=f8Orl0+rFcesGu6vUIhvHbqaBgUgMuKnBi+9MLYFNL/hFVVHPvK2EKZHH3DbggEMghFyAQ QpSi+C0pJJsN6fDoCa2UMhiXPcOd27AMCJTowd8ImykHPa9gmgYCpNfsFJFTtfy8KvWGWm hGSdsQSgFEQD27wPR/HYOO7W/WMN8Nw= 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-159-HcyxXZ_fOKim-3NV21rk8g-1; Mon, 15 May 2023 14:03:42 -0400 X-MC-Unique: HcyxXZ_fOKim-3NV21rk8g-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 64E8A382C96A; Mon, 15 May 2023 18:03:41 +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 2E3102026D25; Mon, 15 May 2023 18:03:41 +0000 (UTC) Received: by tpad.localdomain (Postfix, from userid 1000) id 65C8A4161E529; Mon, 15 May 2023 15:02:17 -0300 (-03) Message-ID: <20230515180138.591710284@redhat.com> User-Agent: quilt/0.67 Date: Mon, 15 May 2023 15:00:22 -0300 From: Marcelo Tosatti <mtosatti@redhat.com> To: Christoph Lameter <cl@linux.com> Cc: Aaron Tomlin <atomlin@atomlin.com>, Frederic Weisbecker <frederic@kernel.org>, Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Russell King <linux@armlinux.org.uk>, Huacai Chen <chenhuacai@kernel.org>, Heiko Carstens <hca@linux.ibm.com>, x86@kernel.org, Vlastimil Babka <vbabka@suse.cz>, Michal Hocko <mhocko@suse.com>, Peter Xu <peterx@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com> Subject: [PATCH v8 07/13] convert this_cpu_cmpxchg users to this_cpu_cmpxchg_local References: <20230515180015.016409657@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Scanned-By: M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VTbmVtOOz3Cd5f+cwsTmnWopbWs0GKDc6OcjmcDD/F JDWFybvP 8ZJFz4VMiJFf4pzu+eQCxGxokiuSwyeCXP5PwetiX7QEPrkvyPm/5rmqqTynr0xLZ2uxD6jA0Q+w9THgSFhvbuKkxMRPr+pdUMwUs6gMmWXPfnYU0UyHAXil99SevKQcUR8IBlzDneuN6UJyrsHVt8TR5AdrASaY2/7ATbK6dVS5WWNWMbLZv75AOeTPhaJZUGrdWdxueIFK4m1tF65X9zTbSOIZjaN0R68wnFL2KUc4JqFs= 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 |
fold per-CPU vmstats remotely
|
expand
|
Index: linux-vmstat-remote/kernel/fork.c =================================================================== --- linux-vmstat-remote.orig/kernel/fork.c +++ linux-vmstat-remote/kernel/fork.c @@ -205,7 +205,7 @@ static bool try_release_thread_stack_to_ unsigned int i; for (i = 0; i < NR_CACHED_STACKS; i++) { - if (this_cpu_cmpxchg(cached_stacks[i], NULL, vm) != NULL) + if (this_cpu_cmpxchg_local(cached_stacks[i], NULL, vm) != NULL) continue; return true; } Index: linux-vmstat-remote/kernel/scs.c =================================================================== --- linux-vmstat-remote.orig/kernel/scs.c +++ linux-vmstat-remote/kernel/scs.c @@ -83,7 +83,7 @@ void scs_free(void *s) */ for (i = 0; i < NR_CACHED_SCS; i++) - if (this_cpu_cmpxchg(scs_cache[i], 0, s) == NULL) + if (this_cpu_cmpxchg_local(scs_cache[i], 0, s) == NULL) return; kasan_unpoison_vmalloc(s, SCS_SIZE, KASAN_VMALLOC_PROT_NORMAL);