Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp74375rwd; Mon, 15 May 2023 20:22:56 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7M9xY/OZN0cFjzf/mHD/dXMBnmX1VeahANfo83HOi7hFIDrpk7vN70RFwiL47gAi2nQoZ9 X-Received: by 2002:a17:90a:7b8d:b0:247:3548:e470 with SMTP id z13-20020a17090a7b8d00b002473548e470mr35938194pjc.29.1684207376287; Mon, 15 May 2023 20:22:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684207376; cv=none; d=google.com; s=arc-20160816; b=SzkeqnNyQO7d7XA4dWCu7PsL77UEGfNWaJbwOGDh26XiJ5eLM+O/yLfvhybrD92E/0 04Y3xBbfHXCa6jD7mAgqZuSycHaXC28vDKUSRaBMj9XNCLn/cKokLa0G51IoWYeu3Bec 8W7c16YSsBJ1F0jZRys2wWYIA/XfLygYHknXC1bOeSL8G8TNy6RLfDfvMT1k1m6B5fLo W87nt+cp9QcbhvHfUQ25OPcrrCjCId/NdIUzB3Epot3pmrCRa1c62w5dsIgedmLgttA4 p/enmMrt9WUmcnPdsxFMyckTTCEfBT+sJ431e0zNpBvhctfQTTt5sVM+Q2pvJaSdkmMI jrdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:cc:from :references:to:subject:user-agent:mime-version:date:message-id; bh=BgQIAbDgjO3Xo/BQTk4G6Js8KsN8p6hYr9IXGiaTCUw=; b=Awrzif3NNoYz/xLKryfQNLjfXbJZXDhsqw5KB7dgyh1TUZTRd5ySRdOGEXVmUPqVzz 8beBGRwjW4J4VP8z71pmRIRxjEjEaraV7SP+Y9yKdWIrBK99Km2TEneWJvHm12NHZa7q kqlYu8RFmNBkli6iJDuYcUcDS/DezzflXJBbAv+rfTQi1/Aaur05HU+vOFyYWGjRhVRI Mq4xs5OdJcxRJnqQ0LR+EYJh7hAU+KCFO5n55vnoQz/J7cKYr01O4ueOLogr9X6x7aqp 4/f5RuOkT7Pgfg+PhykgMvHPY166o9dHg8W3wmw5xXMLhopnBUgWPvEJbQQNJlJp0zqA hS1A== 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=hisilicon.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y18-20020a17090aa41200b00246aa5e7322si804056pjp.59.2023.05.15.20.22.39; Mon, 15 May 2023 20:22:56 -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; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=hisilicon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229804AbjEPCxK (ORCPT + 99 others); Mon, 15 May 2023 22:53:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229460AbjEPCxJ (ORCPT ); Mon, 15 May 2023 22:53:09 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97706E58 for ; Mon, 15 May 2023 19:53:08 -0700 (PDT) Received: from dggpemm500003.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4QL12g6S5WzsRv1; Tue, 16 May 2023 10:51:07 +0800 (CST) Received: from [10.67.145.254] (10.67.145.254) by dggpemm500003.china.huawei.com (7.185.36.56) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 16 May 2023 10:53:06 +0800 Message-ID: <5e42a892-3826-6370-9702-fefee88bf339@hisilicon.com> Date: Tue, 16 May 2023 10:53:06 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.0.2 Subject: Re: [PATCH] irqchip: gic-v3: Collection table support muti pages To: Marc Zyngier References: <1684152604-12621-1-git-send-email-wangwudi@hisilicon.com> <86jzx9n4qg.wl-maz@kernel.org> <41cbc6cb4e964fe0bbba87f52110b1c3@hisilicon.com> From: wangwudi CC: , Thomas Gleixner In-Reply-To: <41cbc6cb4e964fe0bbba87f52110b1c3@hisilicon.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.145.254] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm500003.china.huawei.com (7.185.36.56) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 在 2023/5/16 9:57, wangwudi 写道: > > > -----邮件原件----- > 发件人: Marc Zyngier [mailto:maz@kernel.org] > 发送时间: 2023年5月15日 20:45 > 收件人: wangwudi > 抄送: linux-kernel@vger.kernel.org; Thomas Gleixner > 主题: Re: [PATCH] irqchip: gic-v3: Collection table support muti pages > > On Mon, 15 May 2023 13:10:04 +0100, > wangwudi wrote: >> >> Only one page is allocated to the collection table. >> Recalculate the page number of collection table based on the number of >> CPUs. > > Please document *why* we should even consider this. Do you know of any existing implementation that is so large (or need so much memory for its collection) that it would result in overflowing the collection table? Each CPU occupies an entry in the collection table. When there are a large number of CPUs and only one page of the collection table, some CPUs fail to execute ITS-MAPC cmd, and fail to receive LPI interrupts. For example, GITS_BASER indicates that the page_size of the collection table is 4 KB, the entry size is 16 Bytes, and only 256 entries can be stored on one page. When the number of CPUs is more than 256(which is common in the SMP system of the server), the subsequent CPUs cannot receive the LPI. It is noticed by code review, not by on actual HW. > > Thanks, > > M. > > -- > Without deviation from the norm, progress is not possible.