Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1817159rdb; Tue, 20 Feb 2024 07:52:52 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWIU0/wF8SrmVYmT1obQm2t5tZIi5kf2ZPyB8PJMcc16PMeIAX/sXYFaIhh/eHh6R/ic/gF+HYJbO3C36FOae53Tp/1sXjhYltRDGeO0w== X-Google-Smtp-Source: AGHT+IHdaosao2QE4+8i9zzTSufyZtQ21D+gl6QM4K2Urhdoi7sMxXv6o3SvbelqyJC2n84XTdFv X-Received: by 2002:a17:906:248f:b0:a3e:45c6:9f9d with SMTP id e15-20020a170906248f00b00a3e45c69f9dmr9001910ejb.6.1708444372143; Tue, 20 Feb 2024 07:52:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708444372; cv=pass; d=google.com; s=arc-20160816; b=ez41HZMzNZxfOrn8a9sZHWgVFzgc6NIJqZiuIdtsqMb6zeaNVftQa/8KvZ4JG9nVmj hRgCNZJg21Nx5DlwYFoDc3icg/E3ojwhx3sdlVyjmmohUyLVnOL+98+emxKA6H9s6AL7 q6l03V0aFhacrmAlHHpyHbAF5lxZZsLFOVRXFnIcva/es1xCbbypnGEU3LoiG2B3PIaT XJTVxjqfYpSL9oR3+Rf5yxzaT+N0ShSmOn7k4BIPpABWS8MAYDc4xa5xxCF8jIBVuVWj FI6iyXqrWgTb9Kh6LZAAHg0rCFHP3yAbLplLhWPGVMY5mB76iWuOyGeF04jrxVI3eeCj ly1g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=QW4vo7KY7TjTf7t8b02mZpa5q6bvAQKtu0IYCFKj8jw=; fh=jAN0rbuWZS2NpNUW3ox9K42FZ6YABHaYaPPqWCnCgaM=; b=Ra9CZisoaos0GNwDBmJZXxg6jZoh1eZ0xkpOrpBP28q6uD0t3CvH9TE/JpcWS7UCQl AUv6sFO8tow/R3MR9LCSSGfVWcEDRQK2+P7w6JC6rq6ZT2wG5OOEUzpnGQlBtpYMOCKF iR1l9dl24B4sm0c9zXm7zXcv4xCGoqCocQ20UpvJHY8bcBiISSStAcqfMcHSMN6SEW5K ABJ+nGbVtiwgoXUbbcFnNz4w+RZZJ0y8DP9tAnfkc8tJzd57c6Fgg9P1UjzsMX05jGeg xsh2qDk39BbaLFHRq8V0HBJ6Q7+73z8qpvPXt/qo4nAIMMh/DmJP8owx8PSCXx6lphu/ zLAQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=molgen.mpg.de); spf=pass (google.com: domain of linux-kernel+bounces-73276-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73276-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a22-20020a1709064a5600b00a3e8c3fc3eesi2099682ejv.470.2024.02.20.07.52.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 07:52:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-73276-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=molgen.mpg.de); spf=pass (google.com: domain of linux-kernel+bounces-73276-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73276-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id DECA71F21F8A for ; Tue, 20 Feb 2024 15:52:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DB2A8762ED; Tue, 20 Feb 2024 15:52:42 +0000 (UTC) Received: from mx3.molgen.mpg.de (mx3.molgen.mpg.de [141.14.17.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EAEA5762C5 for ; Tue, 20 Feb 2024 15:52:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=141.14.17.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708444362; cv=none; b=jApxhnhlUEoAMcyeQJvena2cP0GUaVWKbrL0am9RQxCqI/+S3Sy86MW19I7B3ZkcgRUxnTtpjEQ99M58C/AddA12pV6OQ+ARI1OS/Y747oMSh0yY9eXW4PGMCCwoq0FFXcDzossHPhsyKa3ygoZNFaeIKkI95t2/jTsdupnwvQQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708444362; c=relaxed/simple; bh=hU9zdqsUtvxFQ4fhOcU5tos+YZBJH9VYO1Up5vmlUFY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=dXLhZNxuV3+fX2i50gqTj/ZW9GZZqgNANej6NSoc+Ir5oqlc9f+SIBt2CTJemqy3NozGZv1awPKeBt0B3BdmeBXnSgv0Tmo1OcoksnbImlFeI+P/H1PlpZirSJbaeJMB6QFbDfd2Mjshll6KW9TBUO29cm/S7gvPaQEOeCkIoOc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=molgen.mpg.de; spf=pass smtp.mailfrom=molgen.mpg.de; arc=none smtp.client-ip=141.14.17.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=molgen.mpg.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=molgen.mpg.de Received: from [141.14.220.34] (g34.guest.molgen.mpg.de [141.14.220.34]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id 35D0E61E5FE01; Tue, 20 Feb 2024 16:51:23 +0100 (CET) Message-ID: Date: Tue, 20 Feb 2024 16:51:21 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] ipmi: kcs: Update OBF poll timeout to reduce latency Content-Language: en-US To: Andrew Geissler Cc: minyard@acm.org, joel@jms.id.au, andrew@codeconstruct.com.au, openipmi-developer@lists.sourceforge.net, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org, Andrew Geissler References: <20240220123615.963916-1-geissonator@gmail.com> From: Paul Menzel In-Reply-To: <20240220123615.963916-1-geissonator@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Dear Andrew, Thank you for your patch. Some style suggestions. Am 20.02.24 um 13:36 schrieb Andrew Geissler: > From: Andrew Geissler (Oh no, Yahoo. (ignore)) You could be more specific in the git commit message by using *Double*: > ipmi: kcs: Double OBF poll timeout to reduce latency > ipmi: kcs: Double OBF poll timeout to 200 us to reduce latency > Commit f90bc0f97f2b ("ipmi: kcs: Poll OBF briefly to reduce OBE > latency") introduced an optimization to poll when the host has > read the output data register (ODR). Testing has shown that the 100us > timeout was not always enough. When we miss that 100us window, it > results in 10x the time to get the next message from the BMC to the > host. When you're sending 100's of messages between the BMC and Host, I do not understand, how this poll timeout can result in such an increase, and why a quite big timeout hurts, but I do not know the implementation. > this results in a server boot taking 50% longer for IBM P10 machines. > > Started with 1000 and worked it down until the issue started to reoccur. > 200 was the sweet spot in my testing. 150 showed the issue > intermittently. I’d add a blank line here. > Signed-off-by: Andrew Geissler > --- > drivers/char/ipmi/kcs_bmc_aspeed.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/char/ipmi/kcs_bmc_aspeed.c b/drivers/char/ipmi/kcs_bmc_aspeed.c > index 72640da55380..af1eae6153f6 100644 > --- a/drivers/char/ipmi/kcs_bmc_aspeed.c > +++ b/drivers/char/ipmi/kcs_bmc_aspeed.c > @@ -422,7 +422,7 @@ static void aspeed_kcs_irq_mask_update(struct kcs_bmc_device *kcs_bmc, u8 mask, > * missed the event. > */ > rc = read_poll_timeout_atomic(aspeed_kcs_inb, str, > - !(str & KCS_BMC_STR_OBF), 1, 100, false, > + !(str & KCS_BMC_STR_OBF), 1, 200, false, > &priv->kcs_bmc, priv->kcs_bmc.ioreg.str); > /* Time for the slow path? */ > if (rc == -ETIMEDOUT) Kind regards, Paul