[v7,04/13] this_cpu_cmpxchg: S390: switch this_cpu_cmpxchg to locked, add _local function
Message ID | 20230320180745.632709950@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp1381212wrt; Mon, 20 Mar 2023 11:58:45 -0700 (PDT) X-Google-Smtp-Source: AK7set/kMQYr64oDbo7kMHvJYeVa3a1ZL3Xm7wXr2RMie6TtRotXs5P3strEWsnu1aHQgYYICCHG X-Received: by 2002:a17:902:ecc7:b0:19e:2fb0:a5d9 with SMTP id a7-20020a170902ecc700b0019e2fb0a5d9mr14066315plh.32.1679338724761; Mon, 20 Mar 2023 11:58:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679338724; cv=none; d=google.com; s=arc-20160816; b=y/WtG8YAuobe7To7NR3eX6i1WvlmUvOBgwDvPV+mndJHUufWMjqWIVIwUeEYaup+Nt zIX2VPlIY/X5Hs+pV1gEe8IMcfHCgc80L5H15ghzDF6FBsxFfdnV/tNeKPd26TXqv+iu dzOkrZDz6tjsiLQsxLIh/wk0wgz3Eg3Harvc/vKtuXGSZq3ls68wMoTLRkUBofLcf725 /tkH4locmfUwkVq4ot91ya9+Q8jEf2/6lanr7fmGUI9UUSInngcmJ12trVpeyWTBNGdl i5HYI/41vhRTGL5ArjsUNfbgEKtTJRYbj0MsXxvgpO2m9QKm+JW0druh/jx+Eg7cqSQ6 4OoQ== 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=ZYdI/NkwLfDGmXJs7KnOK9vem40tm0vaN9MiHTPCcnM=; b=QeYbBEoz/Ig5z3aQ389A59eRIUecfddP/0Wtwcyc1VYdCjsTje3wEJwoM1WmEjIX4Q lrzriXGp+M8XavdI9ta2CkIfVntWVdBk1lvlg4UTJ03tIYPYhxRS9H29jqDn1UoH0G5A 0DqZYKDjTvSpKckdg1/7+aVtmpB/P6BclbHHDWOcVdbKL42UX1oMsnWlNIMKBMQf/fkV b9DnNj3WPHXULB+m7+xZQvW2QlGhQIkg7gbRD57K+uhNzm4SX/tcJAw487GGeTlJTxTn /7+uTQ9k1+WN+0tPWFxeJach9K/XLudNsFDeWhkJarHnVHk5iLq+QYR7fA9D9YCRYUYh 4b0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bVllhTjK; 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 e5-20020a17090301c500b0019abec982c2si10163755plh.77.2023.03.20.11.58.32; Mon, 20 Mar 2023 11:58:44 -0700 (PDT) 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=bVllhTjK; 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 S231336AbjCTSVe (ORCPT <rfc822;pusanteemu@gmail.com> + 99 others); Mon, 20 Mar 2023 14:21:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230167AbjCTSUc (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 20 Mar 2023 14:20:32 -0400 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 C01CB7293 for <linux-kernel@vger.kernel.org>; Mon, 20 Mar 2023 11:13:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1679335931; 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=ZYdI/NkwLfDGmXJs7KnOK9vem40tm0vaN9MiHTPCcnM=; b=bVllhTjKFX6mvp0cM+qwus0uOcTolB2dd/eUBgF4A38ykFHcnFE1LCw0mTYxCuHMANpI4s k4GcRi7zI7YXUPmJuyufikA1JXPbdigZhsEgiLSoKNB4eU24jAZhwQLCYFRJytu40ksN1V dzv3fQGr9xg8IFr748+yCucMh4jRmCA= 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-138-7w4ECqAPP2uSVIr-cMmNMA-1; Mon, 20 Mar 2023 14:12:05 -0400 X-MC-Unique: 7w4ECqAPP2uSVIr-cMmNMA-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 32B9B858289; Mon, 20 Mar 2023 18:12:05 +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 062781121315; Mon, 20 Mar 2023 18:12:05 +0000 (UTC) Received: by tpad.localdomain (Postfix, from userid 1000) id DAF1E403BC8B1; Mon, 20 Mar 2023 15:08:02 -0300 (-03) Message-ID: <20230320180745.632709950@redhat.com> User-Agent: quilt/0.67 Date: Mon, 20 Mar 2023 15:03:36 -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>, Marcelo Tosatti <mtosatti@redhat.com> Subject: [PATCH v7 04/13] this_cpu_cmpxchg: S390: switch this_cpu_cmpxchg to locked, add _local function References: <20230320180332.102837832@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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: <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?1760914282542165210?= X-GMAIL-MSGID: =?utf-8?q?1760914282542165210?= |
Series |
fold per-CPU vmstats remotely
|
|
Commit Message
Marcelo Tosatti
March 20, 2023, 6:03 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__; \