Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp186641rwb; Wed, 21 Sep 2022 20:11:09 -0700 (PDT) X-Google-Smtp-Source: AMsMyM42cDgu1OMicaa9QTwAdCYp9RoMepp8ssjNPYtE0boszTSYzUSlXszLlelDAy4Q2JysUari X-Received: by 2002:a17:902:6bc8:b0:178:81db:c6d9 with SMTP id m8-20020a1709026bc800b0017881dbc6d9mr1223378plt.56.1663816269155; Wed, 21 Sep 2022 20:11:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663816269; cv=none; d=google.com; s=arc-20160816; b=vexTR5iAMDviUEF+RzTl7YOUhRui1I+9bX4FSReRUD1iduOg3Pwrr2mSQ73PjQbgPn KF0PQbdu1i2zt1JDdyidca9dyMKXRbY1y6rkdq0je6W4j//VC5W0Kwc1T5BgED0Okk0z u6fs/JoUgBlKywAdbGO+rNzWzEi11kynK/6RtatzZBoP0RfvfrSihIkSKbdYCJN7WtRs ccvUWTXTiEYcZwreuTZvBNWEN6V54zqhmxV300QZyiXDzE/TpL7llCA9gBYquHn8c6Tv HJHJ7rcCZgE5zOR3Waef0TcHlb/AEMWErGaQORG8cQfi0OvUlrvELXvJhnTPl+4qDz/V 6mPw== 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:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=zJM1NCgggk5Yo7BjfZgFukZNbx74RC6Nwt4J0+CnzNk=; b=SJnGOL55hD4NHVf1sb0rI64wLfjqKD0ixMLAX0ri8LlfW2XTUJ6s2zd8DZD0TipaTC C5qXKljoLSWK504khotPLf3MpQB0fCVFNzwyezjPs/Pg0MqXmJwW2GVb1NTM8aprVigM 2r40vC2KUcIUspJf9g2uKsfQfXzohSAx9gXgRn7M5H7jwZX6HLlvJLU1Lh9bzfZ8O0Kl lfwCDUNk0sU7t3pc97+3JVyKgA+1KdMZVf/Zympc8+KbosBG+/2OyhYTU1m+xGxhNID8 FovxlPpv4C1Y+YmgNET42iUQKs9FwNDy8m7f+5XlWrjtKgVrZ0pWfXTbuPVEo3O0qBlG 6uXw== 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=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h26-20020a63211a000000b0042bc0600864si5055479pgh.536.2022.09.21.20.10.56; Wed, 21 Sep 2022 20:11:09 -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=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229803AbiIVC3N (ORCPT + 99 others); Wed, 21 Sep 2022 22:29:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229787AbiIVC3K (ORCPT ); Wed, 21 Sep 2022 22:29:10 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38729AB4F2; Wed, 21 Sep 2022 19:29:09 -0700 (PDT) Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MXzdR2mwRzlXLY; Thu, 22 Sep 2022 10:24:59 +0800 (CST) Received: from kwepemm600004.china.huawei.com (7.193.23.242) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 22 Sep 2022 10:29:07 +0800 Received: from [10.67.103.231] (10.67.103.231) by kwepemm600004.china.huawei.com (7.193.23.242) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 22 Sep 2022 10:29:06 +0800 Message-ID: Date: Thu, 22 Sep 2022 10:29:06 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH 1/2] ACPI: PCC: replace wait_for_completion() To: Sudeep Holla CC: , , , , , References: <20220920094500.11283-1-lihuisong@huawei.com> <20220920094500.11283-2-lihuisong@huawei.com> <20220921154737.az3d4ndxs3u3zwbl@bogus> From: "lihuisong (C)" In-Reply-To: <20220921154737.az3d4ndxs3u3zwbl@bogus> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.103.231] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemm600004.china.huawei.com (7.193.23.242) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,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 在 2022/9/21 23:47, Sudeep Holla 写道: > On Tue, Sep 20, 2022 at 05:44:59PM +0800, Huisong Li wrote: >> Currently, the function waiting for completion of mailbox operation is >> 'wait_for_completion()'. The PCC method will be permanently blocked if >> this mailbox message fails to execute. So this patch replaces it with >> 'wait_for_completion_timeout()'. And set the timeout interval to an >> arbitrary retries on top of nominal to prevent the remote processor is >> slow to respond to PCC commands. >> > Sounds good to me. The only concern(may be not serious) is what happens > if we receive response from the platform after the timeout. I have tested If OS still cann't receive response in noramal latency(must be filled accurately as protocol said) + retries, there is a high probability that an exception occurs. Even if we receive response after the timeout, I think there may be no impact, but the response data in PCC share memory is ignored. > for that in non ACPI non PCC context. I don't have a setup to trigger that > with ACPI PCC + this patch to test. Other than that, I am fine with this: > > Reviewed-by: Sudeep Holla >