[v2,04/11] this_cpu_cmpxchg: S390: switch this_cpu_cmpxchg to locked, add _local function
Message ID | 20230209153204.737772842@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp404190wrn; Thu, 9 Feb 2023 07:36:36 -0800 (PST) X-Google-Smtp-Source: AK7set8CGdimemAtFNZ8bn74ppCZAoVDfRwUJenuyby7MXnyTbLXGp7s1kkJ6gXRuQmS0pVbapOR X-Received: by 2002:a17:907:a804:b0:8a6:5720:9101 with SMTP id vo4-20020a170907a80400b008a657209101mr14308476ejc.4.1675956996270; Thu, 09 Feb 2023 07:36:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675956996; cv=none; d=google.com; s=arc-20160816; b=GpByN0KYQZgx+uPcIXK4oW8Vx4zOxMxj7XEoxQK/t8Ptxn3Imw5j0dW/xXOiaEUWgs c7gbJc9i25nXruy3jlA9E+tBLFKjeq7L0XClqQRTROhxypARNBi3aPUD9oIpmpaUg1zI sMLUN0ZIMngNLCMLs/GSIIpjnGOARGAGLk9WC5iWEs0dcGx1fnzNg16Qd4O848m5IBCy /Pw4shsxY7vUtrTVKQtVVBK4zWEi1MnOlWEFH5OgOA+kWgFB7QW7+o02v0BTcBgQduQr yegVkeEt07rxfHpx2Ndn26I2Pa5BfLEPmtBPw8IENEO3FktMWIluSgIXu7HgMrQbMLMB SoyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:subject:cc:to:from:date :user-agent:message-id:dkim-signature; bh=FePX2+VFBr01iZwaVbBM1HjdLAtX/eNoAgkcl35m848=; b=hjxbq9xIfKz5AbE4GHX4nU+D/yuca5gDvE6ZLeEYTFD1Ob+QPbOJJL6gz+GtPyIll7 afP2mfqABS2LQcNT7zpGqGRIa88o200DHvsiaWuA/R9wkMJAH5pLKh2WfkFVtsigifDJ /qEEwjbX3OaK/f/+w6KXI2gr/3C+98wrr89iEVRU1NXru6g9SDBD9qwK6ZK7GC07Kmoi 23WnI2rZ2BgKMhjYy/8ieUhUREI7z9L9WexapZDW8v0lEfvKOc0S4M3lMWhAdooMagno 6EhpeRWingzguN9uF66GBDX/9awFogd7GO7RUVpRGUQXPex5qkZF20lMT7I8A/Jib6dG NPow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="DueGOE/W"; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 12-20020a170906224c00b0087a6a62dd48si3027617ejr.297.2023.02.09.07.36.13; Thu, 09 Feb 2023 07:36:36 -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="DueGOE/W"; 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 S231371AbjBIPez (ORCPT <rfc822;ybw1215001957@gmail.com> + 99 others); Thu, 9 Feb 2023 10:34:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230435AbjBIPet (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 9 Feb 2023 10:34:49 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D53D5C48F for <linux-kernel@vger.kernel.org>; Thu, 9 Feb 2023 07:33:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675956804; 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=FePX2+VFBr01iZwaVbBM1HjdLAtX/eNoAgkcl35m848=; b=DueGOE/WgGjuikn8AERpx5fogV0gjbbI5u+9lzu2vp86IdhcyEcZKBkMeRtDD2iZgVnelP NewLAoEBMw/s44r2qQMyvQBALYDm0gKeCYT+jJRh8qQ17ZPtDgSbN0H2nmDrL9aoNk5tBb iAzVJas9iO3TD9GZhAYHoghwQ4dWfq0= 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-467-f84dd5UROTGCJx2buXnEzg-1; Thu, 09 Feb 2023 10:33:20 -0500 X-MC-Unique: f84dd5UROTGCJx2buXnEzg-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 CFC68104F0D0; Thu, 9 Feb 2023 15:33:14 +0000 (UTC) Received: from tpad.localdomain (ovpn-112-3.gru2.redhat.com [10.97.112.3]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A28292026D76; Thu, 9 Feb 2023 15:33:14 +0000 (UTC) Received: by tpad.localdomain (Postfix, from userid 1000) id 6F68A403CC073; Thu, 9 Feb 2023 12:32:51 -0300 (-03) Message-ID: <20230209153204.737772842@redhat.com> User-Agent: quilt/0.67 Date: Thu, 09 Feb 2023 12:01:54 -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, Marcelo Tosatti <mtosatti@redhat.com> Subject: [PATCH v2 04/11] this_cpu_cmpxchg: S390: switch this_cpu_cmpxchg to locked, add _local function References: <20230209150150.380060673@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757368283507427066?= X-GMAIL-MSGID: =?utf-8?q?1757368283507427066?= |
Series |
fold per-CPU vmstats remotely
|
|
Commit Message
Marcelo Tosatti
Feb. 9, 2023, 3:01 p.m. UTC
Goal is to have vmstat_shepherd to transfer from
per-CPU counters to global counters remotely. For this,
an atomic this_cpu_cmpxchg is necessary.
Following the kernel convention for cmpxchg/cmpxchg_local,
add S390's this_cpu_cmpxchg_local.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Index: linux-vmstat-remote/arch/s390/include/asm/percpu.h =================================================================== --- linux-vmstat-remote.orig/arch/s390/include/asm/percpu.h +++ linux-vmstat-remote/arch/s390/include/asm/percpu.h @@ -148,6 +148,11 @@ #define this_cpu_cmpxchg_4(pcp, oval, nval) arch_this_cpu_cmpxchg(pcp, oval, nval) #define this_cpu_cmpxchg_8(pcp, oval, nval) arch_this_cpu_cmpxchg(pcp, oval, nval) +#define this_cpu_cmpxchg_local_1(pcp, oval, nval) arch_this_cpu_cmpxchg(pcp, oval, nval) +#define this_cpu_cmpxchg_local_2(pcp, oval, nval) arch_this_cpu_cmpxchg(pcp, oval, nval) +#define this_cpu_cmpxchg_local_4(pcp, oval, nval) arch_this_cpu_cmpxchg(pcp, oval, nval) +#define this_cpu_cmpxchg_local_8(pcp, oval, nval) arch_this_cpu_cmpxchg(pcp, oval, nval) + #define arch_this_cpu_xchg(pcp, nval) \ ({ \ typeof(pcp) *ptr__; \