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,DKIM_INVALID, DKIM_SIGNED,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 E6113C433E1 for ; Tue, 14 Jul 2020 13:23:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A98CB22461 for ; Tue, 14 Jul 2020 13:23:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="Kh3uWg7u" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728350AbgGNNXz (ORCPT ); Tue, 14 Jul 2020 09:23:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727858AbgGNNXy (ORCPT ); Tue, 14 Jul 2020 09:23:54 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADA85C061755; Tue, 14 Jul 2020 06:23:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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=T7rggtXykXMc4C3uWwX+AsNgDJpkydxTqpZAtzGfPZw=; b=Kh3uWg7u8XQglQ4xrw+ceXYX8S CWYZSH7s+NgPkTUhlq3N/9wlFTdrJWTUnC9eq/G9rVKsKpa3nSNgKcvTJyVzIzkn5nUzA/PZoDzoU dLfUT4nS8snnIwOWcrOzkVucwrUhbZdhbvN+5Dr/QZ+Asez6AXurhhpzMkQ2139xhUsSPU2xWIIQQ 7gxe6uFmEEyfFAzvaexTRkN7d5JSEbyo9mJKoddyBTvgQyAvEWHAF6x06dSySkk64A+k4SRf2+Nf6 wB4G28sTRoDwXUGqj2sP0qL2DpJotZ27Aa94peKoOJ0bT/0WvZ+cCmHU5fXW+e2BbzVlAJRePIXXd TkX/DowA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvKuM-0004mD-H6; Tue, 14 Jul 2020 13:23:42 +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 BF165302753; Tue, 14 Jul 2020 15:23:41 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id AB5BC2BE34E09; Tue, 14 Jul 2020 15:23:41 +0200 (CEST) Date: Tue, 14 Jul 2020 15:23:41 +0200 From: Peter Zijlstra To: Andy Lutomirski Cc: Nicholas Piggin , Anton Blanchard , Arnd Bergmann , linux-arch , LKML , Linux-MM , linuxppc-dev , Andy Lutomirski , Mathieu Desnoyers , X86 ML Subject: Re: [RFC PATCH 7/7] lazy tlb: shoot lazies, a non-refcounting lazy tlb option Message-ID: <20200714132341.GY10769@hirez.programming.kicks-ass.net> References: <1594708054.04iuyxuyb5.astroid@bobo.none> <6D3D1346-DB1E-43EB-812A-184918CCC16A@amacapital.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6D3D1346-DB1E-43EB-812A-184918CCC16A@amacapital.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 14, 2020 at 05:46:05AM -0700, Andy Lutomirski wrote: > x86 has this exact problem. At least no more than 64*8 CPUs share the cache line :) I've seen patches for a 'sparse' bitmap to solve related problems. It's basically the same code, except it multiplies everything (size, bit-nr) by a constant to reduce the number of active bits per line. This sadly doesn't take topology into account, but reducing contention is still good ofcourse. 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,DKIM_INVALID, DKIM_SIGNED,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 41F74C433E0 for ; Tue, 14 Jul 2020 13:26:31 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (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 A92A022203 for ; Tue, 14 Jul 2020 13:26:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="Kh3uWg7u" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A92A022203 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4B5h9w2XrQzDqfk for ; Tue, 14 Jul 2020 23:26:28 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=infradead.org (client-ip=2001:8b0:10b:1236::1; helo=casper.infradead.org; envelope-from=peterz@infradead.org; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=casper.20170209 header.b=Kh3uWg7u; dkim-atps=neutral Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4B5h6v5KT8zDqdS for ; Tue, 14 Jul 2020 23:23:51 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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=T7rggtXykXMc4C3uWwX+AsNgDJpkydxTqpZAtzGfPZw=; b=Kh3uWg7u8XQglQ4xrw+ceXYX8S CWYZSH7s+NgPkTUhlq3N/9wlFTdrJWTUnC9eq/G9rVKsKpa3nSNgKcvTJyVzIzkn5nUzA/PZoDzoU dLfUT4nS8snnIwOWcrOzkVucwrUhbZdhbvN+5Dr/QZ+Asez6AXurhhpzMkQ2139xhUsSPU2xWIIQQ 7gxe6uFmEEyfFAzvaexTRkN7d5JSEbyo9mJKoddyBTvgQyAvEWHAF6x06dSySkk64A+k4SRf2+Nf6 wB4G28sTRoDwXUGqj2sP0qL2DpJotZ27Aa94peKoOJ0bT/0WvZ+cCmHU5fXW+e2BbzVlAJRePIXXd TkX/DowA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvKuM-0004mD-H6; Tue, 14 Jul 2020 13:23:42 +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 BF165302753; Tue, 14 Jul 2020 15:23:41 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id AB5BC2BE34E09; Tue, 14 Jul 2020 15:23:41 +0200 (CEST) Date: Tue, 14 Jul 2020 15:23:41 +0200 From: Peter Zijlstra To: Andy Lutomirski Subject: Re: [RFC PATCH 7/7] lazy tlb: shoot lazies, a non-refcounting lazy tlb option Message-ID: <20200714132341.GY10769@hirez.programming.kicks-ass.net> References: <1594708054.04iuyxuyb5.astroid@bobo.none> <6D3D1346-DB1E-43EB-812A-184918CCC16A@amacapital.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6D3D1346-DB1E-43EB-812A-184918CCC16A@amacapital.net> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch , Arnd Bergmann , X86 ML , LKML , Nicholas Piggin , Linux-MM , Mathieu Desnoyers , Andy Lutomirski , linuxppc-dev Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Tue, Jul 14, 2020 at 05:46:05AM -0700, Andy Lutomirski wrote: > x86 has this exact problem. At least no more than 64*8 CPUs share the cache line :) I've seen patches for a 'sparse' bitmap to solve related problems. It's basically the same code, except it multiplies everything (size, bit-nr) by a constant to reduce the number of active bits per line. This sadly doesn't take topology into account, but reducing contention is still good ofcourse.