Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1813259rdb; Tue, 20 Feb 2024 07:46:51 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV9g/LcZ8QP7Vj68qs+IJfiU83UwR4jID4xzWlWapU5JSx/TxAHAHWSC1OnLmnIfKw6Y37nwp7tg79QdUIuhil/Gsv2BhrP4k/ciA/akA== X-Google-Smtp-Source: AGHT+IEpSFkj1U9rgGZ3ccWFYPuXbTwI96BDnD/KNgv71tLFM/giOcK/qsQyOcaZP5i/49DaIsr3 X-Received: by 2002:a05:6a21:2d8e:b0:19c:8d73:721b with SMTP id ty14-20020a056a212d8e00b0019c8d73721bmr20997027pzb.57.1708444011147; Tue, 20 Feb 2024 07:46:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708444011; cv=pass; d=google.com; s=arc-20160816; b=q4PhK3NheBhwNRp+B/Nk1Ir3wLwsMIcA6n3fmoinU74YGMN7Ijarqd5XnZJaazJTcu 8EIfSRQpHDQd5Tqofflh4IiFJdJXKrJ89Q1e5Lkr8uNT5eb/MysaPyhBw5a41uQUq8BZ rPnqm82ljI0bGS1vNUUy6BhveGRhlT6BNrDNXyT8CTKHOBOk2oPaNOUMFac3Xtf1ZImO HDcAkTPokzz7AGrR8jcPpHV6kh4l5xEEA16wK4FvqPOSwk2HCEGqOEG2sg/fZOuIsSIo 6f6dtC1xIMm/jy+p4+UFFal77iKCLrVOIu6amtEnAuM5EdNG1Tpor7LXYYRHKCf+J/xv FJNQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=Ba+FZT/y8DAA+ic+9F75Kom97L71NReEfdPzSuOXjjQ=; fh=Ovt/Xw2iB6PjxVZCCF+o3ryYpu1MwqOaJHXra+zgPEs=; b=VfiC9//87J3W19NSlpgXKrlXrCj1GiEpVY/DbyZBo1fH2n2LfUBxLDvjmi/rh2v3DU qHiTLz3GoUia4OMoBRP4zwgUdPCxyM+JUO8Rore19LfCAetx5DhlwEk+Y1xAocPqWV5D D3kgqxAppfT83vFCF9j9xM9gkUFYvaM6jfCzK9Qz9DAhuq3gKHbeS/CggkUGGonS24q6 tr/C1+wZBeNrER1pJdD/Cgw4O+b4AuVNr1q/XeOI5sPR+LptNN3cV2eHO3OL3My8ow+w n9lCZeICkTx4Ppt05yC3lFPHMPbXXrXp2jQbK4/XDncUHtdyoPqscOomkhorR+QFfSwX xZiw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=DL4j15bR; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-73267-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73267-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id cl4-20020a056a0032c400b006e06aaf608csi2998736pfb.137.2024.02.20.07.46.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 07:46:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-73267-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=DL4j15bR; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-73267-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73267-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id B1DB9B23FF5 for ; Tue, 20 Feb 2024 15:43:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7723D7605C; Tue, 20 Feb 2024 15:43:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DL4j15bR" Received: from mail-oo1-f50.google.com (mail-oo1-f50.google.com [209.85.161.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3C93D627EA for ; Tue, 20 Feb 2024 15:43:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708443788; cv=none; b=UaTZxwQ23E5YA2F7YbrHuk6vKwkB6m4oqGTiPhDeECHytk4ppJ0f6D8wiFAPABUW8PZjVFq+5aMpi65pkl3FeK828QjuW43RGCfx2Fpfq6TWAjBlH+qfDfP8RC0ypU04qqc1Cf0ahV6YRIf3IRX7gF7M8AtkJnJlkhGR5JIcyis= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708443788; c=relaxed/simple; bh=BHwUKr8biU6qwSoYRciff715r/Wq10MJ8jrCOgZ4EeI=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=VcZy380SU6gf233ivH/T3yQgzbF7AP+9+JgltTzj5IlPDNcGK8xlmOxB1fNJt3eUn2HnYjpIzEV0kwzmoRjEutDNZdGenOgHJrh1BqiQ1m8LQvTrkwf/B7cgYh0g0X9vOALKDTx/3jsipNtGMUSc+XY+yaD+ZP4BZkHRgBOLVt4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=DL4j15bR; arc=none smtp.client-ip=209.85.161.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oo1-f50.google.com with SMTP id 006d021491bc7-59d78deb469so3513849eaf.1 for ; Tue, 20 Feb 2024 07:43:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708443786; x=1709048586; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Ba+FZT/y8DAA+ic+9F75Kom97L71NReEfdPzSuOXjjQ=; b=DL4j15bRVw8JX0Ue+Ro2pio4rRhekzaUMSW1tEC7sQOMlxAiPh+xP330Y+nZm9Hlhz Wk8IoeF0J8sC69vf7kGBNng3CHShuVURcTx34I0z4ynj/VCzw20J+FJiovGZAMjMINLV T+QL2QgJhi4Gw41wbWkyuAQqlGVVqxInrfzyndyOqAuhuor/65HEnOqnSMDK90F3Er3I T3eDTA1IxWlKiUca0YgoHAZazT4/HIzS4XjTcyjSs+UAxA1NGaATlG3Bsf3+/1pym/Ro fgFld9PggqtwvfRmydvbmhjINQ1Uw2tyopRfRpr5nKD8Y1FyLzkkFYmLWywzzaNCeUvG G6sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708443786; x=1709048586; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Ba+FZT/y8DAA+ic+9F75Kom97L71NReEfdPzSuOXjjQ=; b=LktsoA6HqA6Te1VklGP2MaC4euxQstPkxKBzZ8s4J8rKl78yxoCPSw0r4DsNz0EIXJ HK338ASiRJ4BfDTzR6hUEwzdL+glQGNGLNyPWbijUr1dVE+JcwCRYjsy2ILNjghHfT2b exrO/RmX2eEDiRXyFYbuZRuZtdDLjaprsI0gZ3OIk3c9ZEHIZG3SfQNb4JHCaKbeOWFg mkC3tnX7LPVPiciitJmeADykqfUsD9ZcM0CmPNNNvVPpTviPWw29n1eQn0d6xV5PEL5f 17ULJbx5mQ+OKNrkaEzKqYqkCQbzCS+bq4GvyozJ1VRaquNonV8c56oFTTT40zO4/PYe DQ3Q== X-Forwarded-Encrypted: i=1; AJvYcCW/ndu4QExu3rKkl83EjY03rgLO8iam8PyQLnHPlmlLu54CQ8To12lFOR2m8Y7v3c+sbv4rGAxOcoPC4H/aqomvmGVg07+hs7AhZazi X-Gm-Message-State: AOJu0Yy6+0M2OXbDgv8wopZDHKnWFoE1K/5b9IBL/ELhErVTciyz0u9A xppQK5RQj1OeBIT9WaGPOnO8moA9hKMZEcjmjozRZxW7ohQn5+FN X-Received: by 2002:a4a:355a:0:b0:59f:fc30:d3aa with SMTP id w26-20020a4a355a000000b0059ffc30d3aamr2191859oog.3.1708443786272; Tue, 20 Feb 2024 07:43:06 -0800 (PST) Received: from localhost.localdomain ([129.41.86.2]) by smtp.gmail.com with ESMTPSA id p3-20020a4adfc3000000b0059aaa2bebb6sm1388768ood.48.2024.02.20.07.43.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 07:43:05 -0800 (PST) From: Andrew Geissler To: 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 Cc: Andrew Geissler , openbmc@lists.ozlabs.org Subject: [PATCH] ipmi: kcs: Update OBF poll timeout to reduce latency Date: Tue, 20 Feb 2024 06:36:15 -0600 Message-Id: <20240220123615.963916-1-geissonator@gmail.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Andrew Geissler 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, 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. 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) -- 2.39.2