mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shuai Xue <xueshuai@linux.alibaba.com>
To: "Luck, Tony" <tony.luck@intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	"bp@alien8.de" <bp@alien8.de>,
	"james.morse@arm.com" <james.morse@arm.com>,
	"lenb@kernel.org" <lenb@kernel.org>,
	"rjw@rjwysocki.net" <rjw@rjwysocki.net>
Cc: "zhangliguang@linux.alibaba.com" <zhangliguang@linux.alibaba.com>,
	"zhuo.song@linux.alibaba.com" <zhuo.song@linux.alibaba.com>
Subject: Re: [PATCH] ACPI, APEI, EINJ: Relax platform response timeout to 1 second.
Date: Sun, 17 Oct 2021 12:06:52 +0800	[thread overview]
Message-ID: <869f0c92-0800-b24e-9de8-d8c9cb6972a7@linux.alibaba.com> (raw)
In-Reply-To: <4d492cef3640414d85ecfdb602ad6fa0@intel.com>

Hi, Tony,

Thank you for your reply.

> Spinning for 1ms was maybe ok. Spinning for up to 1s seems like a bad idea.
>
> This code is executed inside a mutex ... so maybe it is safe to sleep instead of spin?

May the email Subject misled you. This code do NOT spin for 1 sec. The period of the
spinning depends on the SPIN_UNIT.

> -#define SPIN_UNIT		100			/* 100ns */
> -/* Firmware should respond within 1 milliseconds */
> -#define FIRMWARE_TIMEOUT	(1 * NSEC_PER_MSEC)
> +#define SPIN_UNIT		100			/* 100us */
> +/* Firmware should respond within 1 seconds */
> +#define FIRMWARE_TIMEOUT	(1 * USEC_PER_SEC)

The period was 100 ns and changed to 100 us now. In my opinion, spinning for 100 ns or 100 us is OK :)

The timeout_default is set with FIRMWARE_TIMEOUT (1 sec) by default. If the platform do not
respond within timeout_default after multiple spins, the OSPM will print a warning message to
dmesg.

Regards,
Shuai


On 2021/10/15 PM11:37, Luck, Tony wrote:
>> We observe that the waiting time for DDR error injection is about 10 ms
>> and that for PCIe error injection is about 500 ms in Arm platfrom.
>>
>> In this patch, we relax the response timeout to 1 second and allow user to
>> pass the time out value as a argument.
> 
> Spinning for 1ms was maybe ok. Spinning for up to 1s seems like a bad idea.
> 
> This code is executed inside a mutex ... so maybe it is safe to sleep instead of spin?
> 
> -Tony
> 

  reply	other threads:[~2021-10-17  4:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-15  3:38 Shuai Xue
2021-10-15 15:37 ` Luck, Tony
2021-10-17  4:06   ` Shuai Xue [this message]
2021-10-18 15:40     ` Luck, Tony
2021-10-19 13:33       ` Shuai Xue
2021-10-22 13:44 ` [PATCH v2] " Shuai Xue
2021-10-22 23:54   ` Luck, Tony
2021-10-24  9:10     ` Shuai Xue
2021-10-25 12:49       ` Shuai Xue
2021-10-25 15:59         ` Luck, Tony
2021-10-26  7:28 ` [PATCH v3] " Shuai Xue
2021-10-26 17:05   ` Luck, Tony
2021-10-27  2:18     ` Shuai Xue
2021-10-27 18:24     ` Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=869f0c92-0800-b24e-9de8-d8c9cb6972a7@linux.alibaba.com \
    --to=xueshuai@linux.alibaba.com \
    --cc=bp@alien8.de \
    --cc=james.morse@arm.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=tony.luck@intel.com \
    --cc=zhangliguang@linux.alibaba.com \
    --cc=zhuo.song@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®