Message ID | 20230305134053.513805071@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 5C13CC61DA4 for <linux-mm@archiver.kernel.org>; Sun, 5 Mar 2023 13:41:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7B9CB6B0073; Sun, 5 Mar 2023 08:41:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6A5706B0074; Sun, 5 Mar 2023 08:41:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4F96E6B0075; Sun, 5 Mar 2023 08:41:49 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 3EB2B6B0073 for <linux-mm@kvack.org>; Sun, 5 Mar 2023 08:41:49 -0500 (EST) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 13FC31203F1 for <linux-mm@kvack.org>; Sun, 5 Mar 2023 13:41:49 +0000 (UTC) X-FDA: 80534957538.18.EE9BBF3 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf03.hostedemail.com (Postfix) with ESMTP id 561A72000F for <linux-mm@kvack.org>; Sun, 5 Mar 2023 13:41:47 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=ckrOSTEU; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf03.hostedemail.com: domain of mtosatti@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=mtosatti@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1678023707; 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=FePX2+VFBr01iZwaVbBM1HjdLAtX/eNoAgkcl35m848=; b=vqIXHdtEh8A04gYtfN3OkYzeF10b0IIC6dPjlFrQC5e+sk8r0YHTG/sELU4NYvKERMM/3y Fs63biW4xmjmYtDlRycfMsHUCagF9i6OyhZKhGRAvbKKsEpJIhKQDQ4JkKCkcJi0H9uGsq tANIuNFR+KKtiVsZgm5k+Q8Xyu7/Ea8= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=ckrOSTEU; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf03.hostedemail.com: domain of mtosatti@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=mtosatti@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1678023707; a=rsa-sha256; cv=none; b=eDcQKDpt8WUS+UM+z9d4kCyupkzf3p/4Bthiv6CTT91zgMCx7L6Q7dxFME8Qng9RhLDBCe nx+zYmNUKn8KleNZjenwPm31q9pWlfKuHUDcmBhdubrcKbDL6Kx/qAu44wtUu9XBdh+Aet UM1y/TXBO8Woh6ynhWyd+pa/hx+yStY= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678023706; 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=ckrOSTEULFNGx/4XFixAsaC+i6eQ11uraKUjf2aHJyf/D6WmaaD+x5zUq77DIEGBMQZPPk K7o84HOeeEbm6zhjZLBWK6KkrmuIBox6XBcdah+tUf4Nav+xIuc34Q6cDGpxHEfmejVXig YW2FRO2Sn0slD6Wsixv7xqgL+UPPsSM= 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-608-fuXqWRBUPB6hB7qRysWiEA-1; Sun, 05 Mar 2023 08:41:45 -0500 X-MC-Unique: fuXqWRBUPB6hB7qRysWiEA-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A8BAD85CBE0; Sun, 5 Mar 2023 13:41:44 +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 7B888492C14; Sun, 5 Mar 2023 13:41:44 +0000 (UTC) Received: by tpad.localdomain (Postfix, from userid 1000) id 20DCB401A07AA; Sun, 5 Mar 2023 10:41:23 -0300 (-03) Message-ID: <20230305134053.513805071@redhat.com> User-Agent: quilt/0.67 Date: Sun, 05 Mar 2023 10:37:01 -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, Marcelo Tosatti <mtosatti@redhat.com> Subject: [PATCH v4 04/12] this_cpu_cmpxchg: S390: switch this_cpu_cmpxchg to locked, add _local function References: <20230305133657.255737580@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Rsp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mBHPZeT7B4b5GHkgCojxFZbZYTGdOUwl JBNddrh0 YfGyGtM9BZSSFNlBS7OJEDDuRx2qM4RQgi8x1a8MooLvnihaKkUPY3UBrU2+0daW+ZGMDcNI4j0q+YRGcCWm7dErIrmh6G3gAzSmUd06UXg6d0chCT8lmWCoAk1UOPGY+5mJcZ4PTXZVjPJ8cgsYkF1Fa2rahAy69n0aPVwgBKnfm1/tzKI8rEUZfZD+NoCk3R6IlIUAlnzrCIkd9b+NjbqFKlhHImR8nHWg60bda2vXn+emhJDHMZXm/2Q== 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/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__; \
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>