Message ID | 20230313162634.408562151@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 7570EC6FD1F for <linux-mm@archiver.kernel.org>; Mon, 13 Mar 2023 16:27:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 915DB6B0080; Mon, 13 Mar 2023 12:27:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 878ED6B0081; Mon, 13 Mar 2023 12:27:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 679A16B0082; Mon, 13 Mar 2023 12:27:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 524B86B0080 for <linux-mm@kvack.org>; Mon, 13 Mar 2023 12:27:49 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 141C4C0C8C for <linux-mm@kvack.org>; Mon, 13 Mar 2023 16:27:49 +0000 (UTC) X-FDA: 80564406258.17.BAB57F2 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf30.hostedemail.com (Postfix) with ESMTP id 1F6E780019 for <linux-mm@kvack.org>; Mon, 13 Mar 2023 16:27:46 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=TjaKDR7s; spf=pass (imf30.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=1678724867; a=rsa-sha256; cv=none; b=pF+JqLMz4DOGP0WdxeFy8dQtLRCfGG76fwlcLo98D6xI32yV+nZWNcSLXgLHb6RqUj/V9N bPyhAWbt+9qV7MLXYl2Ee+J7jDbpM/FXpCIqr7X+IskpYvZM0UyYXxb+UdJs4vJf6lzclT BSqO1PjiU/G8VaS7yQJwOlWZO0trxQs= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=TjaKDR7s; spf=pass (imf30.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=1678724867; 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=4jas7+kZOWWtovsxw7rARjyOL6nO08FiGsNhXOwYk0U=; b=xYYURvVTeRItJiXmxF0x1ZNPZ6MC9qJm6Ydvr/XVqJl82SWDnr3pOXrkw4mblTuQbNFrDc M+8jXmYuMayexpYJr2BgaWEN/MOXGBNFsaQOAgFCMy93RtqFhES+MQRtPsmg/96az2YHdk IFT7KL3pXTdKDcN/FtJS7yRSrik0SwM= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678724866; 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=4jas7+kZOWWtovsxw7rARjyOL6nO08FiGsNhXOwYk0U=; b=TjaKDR7shOeXASwjakBW6TbzDUHvhcZd6HyuVAwkqONMSq+qY0UeXQjVeq5s+yGIYRcVwv ZFSmU8MFGav9wDF8Kvbvdm7MLpfrXIQrdqqrbIAnWg6M5/EN/GtLbGB2vdrzlK9T6hbz/g dq1fNlfziG2BCofZuwlqv8n2ovMXtGk= 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-33-kVC4bivEN-u7qO5pSUEO8w-1; Mon, 13 Mar 2023 12:27:43 -0400 X-MC-Unique: kVC4bivEN-u7qO5pSUEO8w-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 322263C0D1AE; Mon, 13 Mar 2023 16:27:42 +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 F07B23542A; Mon, 13 Mar 2023 16:27:41 +0000 (UTC) Received: by tpad.localdomain (Postfix, from userid 1000) id 25FC74038A1F2; Mon, 13 Mar 2023 13:26:44 -0300 (-03) Message-ID: <20230313162634.408562151@redhat.com> User-Agent: quilt/0.67 Date: Mon, 13 Mar 2023 13:25:13 -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>, Peter Xu <peterx@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com> Subject: [PATCH v5 06/12] convert this_cpu_cmpxchg users to this_cpu_cmpxchg_local References: <20230313162507.032200398@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Scan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9rlkf95DORKGV7WkG8jUOwcOwIAIfqujnpDVp+Y4JI79GMulSVshavP/JEzLdIdQ quxeZUtZ 18a9AhOKnysvgt8fG6DT+5EaqFqPVwM797g+h/pEbFLozUJvEwSXKf8OzhtYCeJr+jy4fh0bhCf7NY0IEJ8DLGeXIlDVFxhqQxx0saFKEIXd+fG8imTYyop7TmFSlE+SwAbYjCy10QvGRzoT/Dfsn2ZvRsbhereC7ZEs6ldv++p/LKEEnAzQnnz2po6sWesOZT8Jzshuq+KBSS4X0aINrf4McVQ== 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 @@ -203,7 +203,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);