Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3057893pxb; Mon, 16 Nov 2020 04:52:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJzzuWWuzUnlFyHnydNUXNDZNTMHK/By1330ePDOfxVguKDg7gZQJPrWI69ajSO72rghC9v2 X-Received: by 2002:a17:906:9445:: with SMTP id z5mr6148659ejx.165.1605531127255; Mon, 16 Nov 2020 04:52:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605531127; cv=none; d=google.com; s=arc-20160816; b=NLKf/EgY8cTbA7zvoq7zn48gXAudUdG95CVj2HtdgBEwZM3uU9zjNSslzrHsgQZZzi x2hwYDufxdUZaEy3KNsUPIAMus7/2qsceB/KALvarxRr7ueyi/dVNiDK4sKyzohPw3WI SFVG8KX01aZLKkh0NM7sIRcQVCBQ/Sh0ie/rWB6cYsBKrzcjNPiNNy9EnXheuAHpoLsG vnpOfuaDEHbsXNI1zKC+7qVCRITBRle67zvP/wlzJGg4W5sWHSmLTg4a3Gz/Yw7Sua7p s7ZNTQIU8ImiCEtSq4z9xJtV3Ks1LE6yXgz+YJh9Fkb0SalAjSOglXmMpV/shDhnHt+3 HENg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=EDm5HUdSzALa6nGwkOC6uvCfTVdzMOyT7mvCy3/aIBc=; b=KEuTKemqNM7wnxZHoOXe/XNSaEJWD+3h13XOciFETguHicOxaEq6EI9OgrFIrQBK+5 f4Y60yFpLRsICKPwhr5ECZ18DLeobDrsM61gSMR75ggonsSu2JD1gx+et5JF7vd+AlFY fd9s5OHNTg8zlbsBb1QM130blEGpLR/Mu0HR0+peMc837PngEtlcdBfa25uZfSTj5KZD CnlxUd4owYsNguqwI5E9EKBPZGIjv8FPgZjaZs0zPCmOKKaRNtDmuBU5HybxD17m+d6J b4JDvMlJcfUYAZ415fu4PBe/EXVYL/4EU/b0Oz9OaHeWHniIXgdJsJY5uTdLFTckEZMH z8EA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=fOMoDJBV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j12si12570084edy.584.2020.11.16.04.51.44; Mon, 16 Nov 2020 04:52:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=fOMoDJBV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727591AbgKPMrF (ORCPT + 99 others); Mon, 16 Nov 2020 07:47:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726199AbgKPMrE (ORCPT ); Mon, 16 Nov 2020 07:47:04 -0500 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 766F6C0613CF for ; Mon, 16 Nov 2020 04:47:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=EDm5HUdSzALa6nGwkOC6uvCfTVdzMOyT7mvCy3/aIBc=; b=fOMoDJBVJayTqypEa67eMhI3iE 3hldbFstRkLBMKcHlUN+mM4I4w1Dr7/YLL1h6GOGbvAITH3cQslNSeXLvGhEKdgnikxE3fZVh2y62 mTRPNV56Kx0HtAEx1BG+AkWVa+I5o3EYA+jDLreBq5xo7x7dMQnfVLQOm3+aXXQsUBLKz2qIVF7Zf h8oH2aapzHWXx7ovG624ExoxEbdUNyFw0EzyxGD6DpjoDpa4LXyJY5rMjI2Rqy9f/acAp2I1RIKfh RbiuwzdHBynOTO0xUEHIqnBu41CFImu84ukBkLT/jmcLfVf1Kg5cuxNBbxs6JYIIvy+tvjYq1vyp7 IRYssnzw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1keduN-0002kB-P0; Mon, 16 Nov 2020 12:46:59 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 9BA2D301959; Mon, 16 Nov 2020 13:46:57 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 84B9D2025CA2A; Mon, 16 Nov 2020 13:46:57 +0100 (CET) Date: Mon, 16 Nov 2020 13:46:57 +0100 From: Peter Zijlstra To: Mel Gorman Cc: Will Deacon , Davidlohr Bueso , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: Loadavg accounting error on arm64 Message-ID: <20201116124657.GA3121392@hirez.programming.kicks-ass.net> References: <20201116091054.GL3371@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201116091054.GL3371@techsingularity.net> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 16, 2020 at 09:10:54AM +0000, Mel Gorman wrote: > Similarly, it's not clear why the arm64 implementation > does not call smp_acquire__after_ctrl_dep in the smp_load_acquire > implementation. Even when it was introduced, the arm64 implementation > differed significantly from the arm implementation in terms of what > barriers it used for non-obvious reasons. This is because ARM64's smp_cond_load_acquire() implementation uses smp_load_aquire() directly, as opposed to the generic version that uses READ_ONCE(). This is because ARM64 has a load-acquire instruction, which is highly optimized, and generally considered cheaper than the smp_rmb() from smp_acquire__after_ctrl_dep(). Or so I've been led to believe.