Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp452809rwb; Wed, 9 Nov 2022 04:52:34 -0800 (PST) X-Google-Smtp-Source: AA0mqf7PE6qiV4a9OqF7e19I9o6ys6PDf+IN6zd4RG1nYDifMCNpuFp/wVbL3+MLCjrqBN2BFf6L X-Received: by 2002:a17:906:178b:b0:7ae:86df:c4fc with SMTP id t11-20020a170906178b00b007ae86dfc4fcmr4176884eje.63.1667998354672; Wed, 09 Nov 2022 04:52:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667998354; cv=none; d=google.com; s=arc-20160816; b=P7ZQ63rZTfA5USMweyTC+TK1Md2F0K8Ddn2nl/eXxUy1pLjfPvBLEbsfZTnh4hdX2q eMdDlbtBz0xJO4owfNrAXU9GCvxdZI8TFR0mPYchGgbbCvWYzntBVyspvdlR/fOaE6ic Ji2kgOUTobh7yV6PsJYzhn7WBWEOipBCXw+9t4jGgur57YNtdghkwQozCqx1uyv3n41/ HMB1MSuEVgbCY9xjTWlrbCAw7GA9d9yQgTepLPUzjEdgjfg3WD4/dzJi7Z1YDX7dmhXa OuvJBH3SFJQK4ru5WPX61A+pfsKy02DnzEkyxFkHDPx5tNAW/fUUvx2UR8aOgTUGsJP/ ij/g== 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; bh=v1W1nuTvnxA4TOBXwWyVx0wAjmFvu8TfmwaJ6vVrgh8=; b=Ub6fg0lp+oebeUzOqqNh2Lyuo+v0RdibIf3tcbwawkfblaPQjap5S4pDGyTrq3z37u ck7L9oT9ObiBVj5L+W5KBaOaroaeTNa9PJOUIYuaqR8gA4FYCMgUrGzUOuAb+a4wUtFp GlvWLe8E0h4QXk7TKO3ONbU8JyXTmmLj2PBrK24jjS3hHjHwuKJmtV+bRIqWYU/8bhwC JQY7KY8ORgnxVhw4YTfdgBL1cGIYj4dz3yLgpRQEXnc+C2pgQeeTbfyTwDBBIe9zw/9I CbPGVRk1+et3f83TB9MRQL1K3qzb2Vuu3COaZAwBGdcp5ZrqMyHbhARTZj6Ly1jx1gba Rqgw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q26-20020aa7da9a000000b0045c26f0050esi14275163eds.238.2022.11.09.04.52.08; Wed, 09 Nov 2022 04:52:34 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230080AbiKIMoC (ORCPT + 93 others); Wed, 9 Nov 2022 07:44:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229615AbiKIMoA (ORCPT ); Wed, 9 Nov 2022 07:44:00 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12C9121E2E for ; Wed, 9 Nov 2022 04:43:59 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id C2D67B81E2D for ; Wed, 9 Nov 2022 12:43:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2C010C43470; Wed, 9 Nov 2022 12:43:55 +0000 (UTC) Date: Wed, 9 Nov 2022 12:43:51 +0000 From: Catalin Marinas To: Yunfeng Ye Cc: will@kernel.org, wangkefeng.wang@huawei.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linfeilong@huawei.com Subject: Re: [PATCH 4/5] arm64: mm: Support ASID isolation feature Message-ID: References: <20221017083203.3690346-1-yeyunfeng@huawei.com> <20221017083203.3690346-5-yeyunfeng@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221017083203.3690346-5-yeyunfeng@huawei.com> X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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, Oct 17, 2022 at 04:32:02PM +0800, Yunfeng Ye wrote: > After a rollover, the global generation will be flushed, which will > cause the process mm->context.id on all CPUs do not match the > generation. Thus, the process will compete for the global spinlock lock > to reallocate a new ASID and refresh the TLBs of all CPUs on context > switch. This will lead to the increase of scheduling delay and TLB miss. > > In some delay-sensitive scenarios, for example, part of CPUs are > isolated, only a limited number of processes are deployed to run on the > isolated CPUs. In this case, we do not want these key processes to be > affected by the rollover of ASID. Part of this commit log should also go in the cover letter and it would help to back this up by some numbers, e.g. what percentage improvement you get with this patchset by running hackbench on an isolated CPU. In theory it looks like CPU isolation would benefit from this patchset but we try not to touch this code often, so any modification should come with proper justification, backed by numbers. Note that I haven't reviewed the algorithm you are proposing in detail, only had a brief look. -- Catalin