From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8EA7FC61DD8 for ; Mon, 16 Nov 2020 12:47:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1B7C121D93 for ; Mon, 16 Nov 2020 12:47:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="fOMoDJBV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727705AbgKPMrF (ORCPT ); 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. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7645C4742C for ; Mon, 16 Nov 2020 12:47:32 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 71A6B20888 for ; Mon, 16 Nov 2020 12:47:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="FBDK0gHc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 71A6B20888 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=MvQawTV+IbDnqn3ZTNIDow3901PXBPsoRVqYO4FbZQs=; b=FBDK0gHcAed5k8P3Xk+/YnG19 OnsEwtg/TYpWCTChHWkJ9dwpvwYNiJFD2TsC0Z/0f0kX9vvbVjpG4C1Kt+koCwFAcx79GDCL4ykpa gAHSMMem2AKfHnKHXbLZXxU0lbQCXaU50gHA2AhlrEp8lBFKQOzEBBEH817IZMUbGcUgJQgZF18Xa C4/WqXmn3GDToLFNGVQ2onWtz+c5rvea+ki7xDRYmpKnz9zzsTvA/qeV1Khexn8DF4+uWs7Uj+bdj cs0i/0ct9ILBptyG8pkqY4+aiZ2VEZY3jHs45BMZbalKE/NxuDAm8SPCW2TWoXYCHJIHC0Uj6ew9Y x3Wf5VZVg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1keduP-0002l2-Fd; Mon, 16 Nov 2020 12:47:01 +0000 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 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-Disposition: inline In-Reply-To: <20201116091054.GL3371@techsingularity.net> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Davidlohr Bueso , Will Deacon , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel