Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp6168030rwl; Wed, 22 Mar 2023 07:21:12 -0700 (PDT) X-Google-Smtp-Source: AKy350a7h91W+vUVG1DWPQy8TG5cOv6uFDlvZ3VQdMjg/JbXW1G3wMGkxelHxBXzZzwjjECyZ4yW X-Received: by 2002:a17:903:41c1:b0:1a0:67fb:444b with SMTP id u1-20020a17090341c100b001a067fb444bmr2718231ple.2.1679494872310; Wed, 22 Mar 2023 07:21:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679494872; cv=none; d=google.com; s=arc-20160816; b=AXAwY9XqHXP3pz21YSyFrh2l6YBeqGirytM4IQw3YW3/WSKT0EPyMJkdYr8nfQV8Z2 aSAqBMYUNCwFx9AcRHH+R2mCEAL8FDoMC5ZVpbw+OgLV/ER1xfYX3h7pB0mHshE194aA O1OCRRDPs4fqB/W+AZ9BNDhpod5/rVKR6zIZ2D2nDg58W15/ibkQ3nOcYv9z6DvDpbL1 OsUO1ydgSMaL5Iyeo9GhnJjYUmZ9vPGC57WDPQ5bdHO8PP4Rpf/pCbOs9gfu0/WnabI1 WkmvtTt6PtxK7EvdvNd2iwCtaN9naEKLaE+C32uctRlWfDOCHd5m1QA/d71hPRyl2Tt0 uhrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=3UqrFGkvaC9MBw1HFItFLIU59aJ0toVTkq8wmsXh6i8=; b=MuSCMtVhcZTVj32c1b00brMk/B7SmzwQ9nIk4h0LSoPYXWW5715uSPmHEm2xPV8IyP JsSD0fQliWthJqWtVAyykfkykfZGfqkLtbD91AJ26AaqGIFWv9bkzuvmbQQPrWva1c0n Qh8Rui9KD1KDprbM1Q06cj/Vvl6n3peODea6+bDz4CoYcf16ON8oxZ8KxiORcXdLSypf SHGBNNlkKgNi51RaTZF66U0YQKLhi6Q8TzQfZT8jjezAGln+Q54LJhdkVkklOIIQnEKX /p5UjtjGai139tp0y80A0eXxWLBXKlhCa2AggqOyb7IpOX31rNLBaXyVSLboDsIXlc9U GoWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XgPo+Pda; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ce8-20020a17090aff0800b0023af4ee47dasi15015024pjb.65.2023.03.22.07.21.00; Wed, 22 Mar 2023 07:21:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XgPo+Pda; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231384AbjCVOMs (ORCPT + 99 others); Wed, 22 Mar 2023 10:12:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231324AbjCVOMh (ORCPT ); Wed, 22 Mar 2023 10:12:37 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87FCB6132C for ; Wed, 22 Mar 2023 07:11:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1679494310; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3UqrFGkvaC9MBw1HFItFLIU59aJ0toVTkq8wmsXh6i8=; b=XgPo+PdamKzkijJxKdSlQOUF5JxkvuKsAyjCcfIDJpRjIMNVdBE5qB7J1yU9kjPmDOsn/g hRagYDX/r4o4OJLQZE0gfDtJTuM9YDjUClHmbQ3hCA5D0nfxRS/J9GtPrv8WUbt+cm5i4K E1+cN6ZcSjYeGdIRgmhEHdNjp51cowg= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-640-yZQ2wKfwMmewOlZ0qyGxgw-1; Wed, 22 Mar 2023 10:11:49 -0400 X-MC-Unique: yZQ2wKfwMmewOlZ0qyGxgw-1 Received: by mail-wr1-f69.google.com with SMTP id o5-20020adf8b85000000b002d58b4b7698so1146890wra.19 for ; Wed, 22 Mar 2023 07:11:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679494306; h=content-transfer-encoding:mime-version:references:in-reply-to:date :cc:to:from:subject:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=3UqrFGkvaC9MBw1HFItFLIU59aJ0toVTkq8wmsXh6i8=; b=JBruaisiDJMiiO/vLbWfF4zVMYfef9lvPGcSlbh+wulF6G2s8MwoXp5qTb7YUctSxk FsiU9IA1izpo3b3jtw84eTGiNEhTW0q1PmW3sRYXoeZwl9Fo0Yrb6ttO9B3UJGhgHVn3 U3PgBkYTh8GnUz4Yaedg0RaGFp2xk8rd7BbgjEBLNzdWDQhvTA6K2g3MF99NuehQjWDI I+B21gaDafPNjsdIVmOaitjeniSs39CNYx7gisY3cUe7b53FoosytjD9fRRZuQTNlKI8 aW42GXGTBJWVJmASKQDzb7ZBdt1AtQtLgzMmcyGq64174ttS8iDbBJKMhTyWTuakPxq2 OT1Q== X-Gm-Message-State: AO0yUKWH485zd/dsJZTvDbYd6ls+a3zupo5IUjhLb4RgF3NLxr6rqIzS mW82jqzQ558bXH/PTzrCLFFO1SUsI7ZN4GLjomiWS3hCuCH5cjgbWusXHLnPUrk8X48hFjO2tMb 9O1aYaPZxVIsvr4ViDl0/sc4V X-Received: by 2002:a5d:68c8:0:b0:2d7:3cd3:85b2 with SMTP id p8-20020a5d68c8000000b002d73cd385b2mr5074907wrw.23.1679494306794; Wed, 22 Mar 2023 07:11:46 -0700 (PDT) X-Received: by 2002:a5d:68c8:0:b0:2d7:3cd3:85b2 with SMTP id p8-20020a5d68c8000000b002d73cd385b2mr5074886wrw.23.1679494306521; Wed, 22 Mar 2023 07:11:46 -0700 (PDT) Received: from ypodemsk.lan (IGLD-84-229-251-248.inter.net.il. [84.229.251.248]) by smtp.gmail.com with ESMTPSA id k10-20020a5d6e8a000000b002d1daafea30sm13889142wrz.34.2023.03.22.07.11.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Mar 2023 07:11:46 -0700 (PDT) Message-ID: Subject: Re: [PATCH] mm/mmu_gather: send tlb_remove_table_smp_sync IPI only to MM CPUs From: ypodemsk@redhat.com To: Peter Zijlstra Cc: will@kernel.org, aneesh.kumar@linux.ibm.com, akpm@linux-foundation.org, npiggin@gmail.com, arnd@arndb.de, linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, mtosatti@redhat.com, ppandit@redhat.com, alougovs@redhat.com, David Hildenbrand Date: Wed, 22 Mar 2023 16:11:44 +0200 In-Reply-To: <20230320084902.GE2194297@hirez.programming.kicks-ass.net> References: <20230312080945.14171-1-ypodemsk@redhat.com> <20230320084902.GE2194297@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 (3.28.5-18.el8) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2023-03-20 at 09:49 +0100, Peter Zijlstra wrote: > On Sun, Mar 12, 2023 at 10:09:45AM +0200, Yair Podemsky wrote: > > Currently the tlb_remove_table_smp_sync IPI is sent to all CPUs > > indiscriminately, this causes unnecessary work and delays notable > > in > > real-time use-cases and isolated cpus, this patch will limit this > > IPI to > > only be sent to cpus referencing the effected mm and are currently > > in > > kernel space. > > Did you validate that all architectures for which this is relevant > actually set bits in mm_cpumask() ? > Hi Peter, Thank you for bringing this to my attention. I reviewed the architectures using the MMU_GATHER_RCU_TABLE_FREE: arm, powerpc, s390, sparc and x86 set the bit when switching process in. for arm64 removed set/clear bit in 38d96287504a ("arm64: mm: kill mm_cpumask usage") The reason given was that mm_cpumask was not used. Given that we now have a use for it, I will add a patch to revert. Thanks Yair