[v5,03/12] this_cpu_cmpxchg: S390: switch this_cpu_cmpxchg to locked, add _local function
Message ID | 20230313162634.333370216@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1291714wrd; Mon, 13 Mar 2023 09:49:46 -0700 (PDT) X-Google-Smtp-Source: AK7set9s+LjRDmmwQVIBkx3qnBw5zvz4tdxCKyfN+qjU2YNcO0SkCzNmCeercujlw0+820lct1Ed X-Received: by 2002:a17:902:7c8d:b0:19e:7001:4763 with SMTP id y13-20020a1709027c8d00b0019e70014763mr29915115pll.43.1678726185812; Mon, 13 Mar 2023 09:49:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678726185; cv=none; d=google.com; s=arc-20160816; b=N5mgKxTTNViNRCml5gCycZ7VFGWpwYLT+z1Sg34JNZpWr6787PGNC9uF7y+jcErMVn G4yXB6P85j90LQOZiJ0YrAUqBe2JYr65x/A7ze9QGMYJRr8sQICk0XIN7vdL/0Ofhaby tX92wdZFacmFg+341KPRZ7mwH+kfNKrrbU8v+JDoqlvW8NQk1QxcqwPn2LM7h5DdUUTn cXBq9wmfo2XpntxdfAoEKcz5QY6kBGauiW88puPEaIfLI5ufO+Xs2qtxKwIpA9qPnftc iydkvVdEm4lCqT+PfqaJ3pmR4GScTt3rJ9/DR4QP/nJ3UJQMJnFBRZLzUgrE+p5av703 e+3g== 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=tN68c+CHr6RJJwbiXKzkoW0jXSg+pVtUPj/NDbu9IJEhTqIk9IeMKlxIEhZ0AUY9F7 n5GE3k2T1Wqb9UPfd23oqms7BygRyqDG+etMB27Rx9yUu9EQh/dJpiiGhyK1gxdP51yu aCJ/ApUY9Y8xAJr7TSRsTBtq7YO7sdSEKibOXmjXgwFwHy76JvF9z2bat5o65WPYBojh bdyEHIzb6SIvP2RgFSMDD3IYr59C7RGmB5tZ5SY+ulb9RytDoLfSsoYqL7VRLK1Yu1pU BkdoW7JOgnephsTtf9funKMhtd9SoGeuRYaOV548AVuzKmJHTi2GWi9zWGJJRGBHfxdW 2dDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QG3Jtyex; 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 f4-20020a170902ce8400b0019cf747251asi174366plg.289.2023.03.13.09.49.32; Mon, 13 Mar 2023 09:49:45 -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=QG3Jtyex; 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 S231355AbjCMQ3J (ORCPT <rfc822;realc9580@gmail.com> + 99 others); Mon, 13 Mar 2023 12:29:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231314AbjCMQ27 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 13 Mar 2023 12:28:59 -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 93D3C79B3D for <linux-kernel@vger.kernel.org>; Mon, 13 Mar 2023 09:27:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678724863; 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=QG3Jtyex1mPPAnDb92thpz1Oo1U+aA3pcYsw9KLmg7TSCi3dgzbnMeyO5KwPOqBTjlaIpS FYnzdgYOxOn4XKlG3eBf5Lrba1Dk9XOZy6s+oAM352O7ThGBMScylnZ6RsjxsN/Ycac2Hs tETs+wXZVO1C43Cc6SQgl6Q0aiO4w3Q= 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-336-rgJUFS3UNpO8OZyHkd8jqg-1; Mon, 13 Mar 2023 12:27:42 -0400 X-MC-Unique: rgJUFS3UNpO8OZyHkd8jqg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D28E680280D; Mon, 13 Mar 2023 16:27:41 +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 A603C140E96A; Mon, 13 Mar 2023 16:27:41 +0000 (UTC) Received: by tpad.localdomain (Postfix, from userid 1000) id 17C3B401CB959; Mon, 13 Mar 2023 13:26:44 -0300 (-03) Message-ID: <20230313162634.333370216@redhat.com> User-Agent: quilt/0.67 Date: Mon, 13 Mar 2023 13:25:10 -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>, Marcelo Tosatti <mtosatti@redhat.com> Subject: [PATCH v5 03/12] this_cpu_cmpxchg: S390: switch this_cpu_cmpxchg to locked, add _local function References: <20230313162507.032200398@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 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?1760271989048107853?= X-GMAIL-MSGID: =?utf-8?q?1760271989048107853?= |
Series |
fold per-CPU vmstats remotely
|
|
Commit Message
Marcelo Tosatti
March 13, 2023, 4:25 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__; \