Message ID | 20230313162634.333370216@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 E34ADC6FD19 for <linux-mm@archiver.kernel.org>; Mon, 13 Mar 2023 16:27:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E1D2F6B007D; Mon, 13 Mar 2023 12:27:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DA6516B007E; Mon, 13 Mar 2023 12:27:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B376D6B0080; Mon, 13 Mar 2023 12:27:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 93A3A6B007D for <linux-mm@kvack.org>; Mon, 13 Mar 2023 12:27:48 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 381D31A0C13 for <linux-mm@kvack.org>; Mon, 13 Mar 2023 16:27:48 +0000 (UTC) X-FDA: 80564406216.22.C29DC0E Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf28.hostedemail.com (Postfix) with ESMTP id 6C3F9C0004 for <linux-mm@kvack.org>; Mon, 13 Mar 2023 16:27:46 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=d7u4V0dh; spf=pass (imf28.hostedemail.com: domain of mtosatti@redhat.com designates 170.10.133.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=1678724866; 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=YraQDrjxzlivlfHvqLEKHFt4+TJUm4UhF3XUTe+IRidl7Od44cvKnr/TiUjoKFCN4JW0oE jVY+ZZDFbf0bKAjUvTTRYAhHy1nZpY6yKX851QrJ8QuthSMp79yTCHRlziL3xhyBIsxWe8 RJqkVWWtW3cMhT76MgG4yCc/c9gH7dE= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=d7u4V0dh; spf=pass (imf28.hostedemail.com: domain of mtosatti@redhat.com designates 170.10.133.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=1678724866; a=rsa-sha256; cv=none; b=VXE8NO4i8NWdwFCPmpAhNkIQxSPwEQZTWCvRoiycCoUCcCmnF3Uq/anNDMEBoeCtPTnU5Z 9qe965x1VlxxgpKlNa6GmNAkkD9mD0iEttciW+cDi5vlOa96Aqsd/KqlReWTPVNJwBcyf5 KSdLvxABY2JdC09UAvIYwxXRtNaklMI= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678724865; 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=d7u4V0dhmvMLFdpQnLP7FiRD4kdqa9PFJBwGZB0zYNZT2vf0a5DT00YXp20nTxBoxmczcU 6dcymya+7RjsX9Lh+1ZWrH51YSZ1GLSOqHMH6itc0aJWvPao6TwuqebmRjOaGCmrT3Sair dGT/i/rLw/XDFbkcTepQtggKxfcfIyg= 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-Rspamd-Queue-Id: 6C3F9C0004 X-Stat-Signature: woaif456bidzzd3yk78e44tuz9yh5i7q X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1678724866-905730 X-HE-Meta: U2FsdGVkX1/v1jlduXcvLC2CAbMVOmzYlnm+lyA1HErj65cCzwU4lpzLGyx0x9bgsWHWxafQzkcvUhbSzB++lnved0Z3I7sW19+2VxRgl6E3yHcweJr2f8xBsviBWCHZhFNm+qKhGtdV1d4F04veLWcXqRNlzETnh/m6HMG4y6mCupzrJqd2JejYvFyBvrwCxl0kZHNWp9XP+pdvnwspWfSWYC0SYiLAbk/8FOxMqAssmaqLR3SPw8oR64fHKs0cm/7VoR80QBIgJvxXADbR9BtBi8jWWS+a3nyVs98JWE7RZdnMXh1Mwf46IQPmpgSwDAerdxsr316R5MA1kmw3fFxTPqUuHiq054m5Zc3Ge68FaZ6M0vcUxcfe9PYSSpgGgjFJFtLcLS8LJjA9PJ2mwM2n4e1qYeLr684JrmqE0/7+F45DNkBv47QqmxtzFmV0rP93fBqjueFmZzad6dVnwEOPwD2Jsok7ol+u4oz5iAHW1ktYjE0wCeJK+jS45lcn/BUO1+GIFVkB2dAQI2PXErvBWO3TovrAdkQyMsWms9i7//aa+ImsZxwzPbgcqlnX5K87x9H1zxSaRN2XUocnePR0RCwLUNja2oBSh+gpTjuuEuqw6/o3aUXBLilO4qDMStTcgXXqS0KntUIDUNOrptHQ9mIggxhhc+rqlu27A+clX/uKo9LZwTN5K1cDT0AWU8bDfogxE5JRfSPKvyLdvyXFKQ+JH5qzXxe7U5FrlW0G7bjtGhIcqRXY8Rr4x5z0+s24+gEOegxiW3tA8UiomRlsIsWSnhCLgbnArW4zsBD3bLRQIJouRh79jtQnPufxH0DFjZUvs3PSQPLxTJUMv/sw5z1BljIrZ2+CTHAK2gqkXn0n/kYSYX/RbfuUMegtpKkdCuZUF0jycj7tNgSzkDVxlQdDtdyZ/dD/PIcIki0H24BelxTi4tr3TGijeAy/TDIKi72DRULTNrJOT+p OtAljqFg 7vcMkSmFEs6qLFsge8IUAMcpKr7zL84tTCAIj3Ju4Tm86XwWWYi5HteVLVbNx4ZaYfJViAUmpohgzQDv9q5HHj18th7JTPAqg8yJU43u/+y8NICI5vJAXEh9feZ16F9zMwxf+n+izAwDx8sDRjJ7pV+XwRwLx05UkO5QTwvJ5OTR3+XscB/N8lZo4Bd/2bxgW8QzNlSIots/LqCl/34YBJDflAdjo4LBM+EmKJW/2uZAJw2Ns+UQLzCaWjA== 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>