* [PATCH] platform/chrome: cros_ec_lpc: Sync filesystem on EC panic
@ 2023-07-26 18:17 Rob Barnes
2023-07-28 2:00 ` patchwork-bot+chrome-platform
2023-07-31 10:10 ` patchwork-bot+chrome-platform
0 siblings, 2 replies; 5+ messages in thread
From: Rob Barnes @ 2023-07-26 18:17 UTC (permalink / raw)
To: bleung, groeck, tzungbi, dtor; +Cc: Rob Barnes, chrome-platform, linux-kernel
Perform a filesystem sync when an EC panic is reported. The
sync is performed twice in case some inodes or pages are
temporarily locked. Testing showed syncing twice significantly
improved reliability.
hw_protection_shutdown is replaced for a couple reasons. It is
unnecessary because the EC will force reset either way.
hw_protection_shutdown does not reliably sync filesystem
before shutting down.
Signed-off-by: Rob Barnes <robbarnes@google.com>
---
drivers/platform/chrome/cros_ec_lpc.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/platform/chrome/cros_ec_lpc.c b/drivers/platform/chrome/cros_ec_lpc.c
index 500a61b093e47..44b7637e745c2 100644
--- a/drivers/platform/chrome/cros_ec_lpc.c
+++ b/drivers/platform/chrome/cros_ec_lpc.c
@@ -327,8 +327,10 @@ static void cros_ec_lpc_acpi_notify(acpi_handle device, u32 value, void *data)
dev_emerg(ec_dev->dev, "CrOS EC Panic Reported. Shutdown is imminent!");
blocking_notifier_call_chain(&ec_dev->panic_notifier, 0, ec_dev);
kobject_uevent_env(&ec_dev->dev->kobj, KOBJ_CHANGE, (char **)env);
- /* Begin orderly shutdown. Force shutdown after 1 second. */
- hw_protection_shutdown("CrOS EC Panic", 1000);
+ /* Sync filesystem before EC resets */
+ ksys_sync_helper();
+ /* Sync again just in case some inodes were temporarily locked */
+ ksys_sync_helper();
/* Do not query for other events after a panic is reported */
return;
}
--
2.41.0.487.g6d72f3e995-goog
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] platform/chrome: cros_ec_lpc: Sync filesystem on EC panic
2023-07-26 18:17 [PATCH] platform/chrome: cros_ec_lpc: Sync filesystem on EC panic Rob Barnes
@ 2023-07-28 2:00 ` patchwork-bot+chrome-platform
2023-07-31 10:10 ` patchwork-bot+chrome-platform
1 sibling, 0 replies; 5+ messages in thread
From: patchwork-bot+chrome-platform @ 2023-07-28 2:00 UTC (permalink / raw)
To: Rob Barnes; +Cc: bleung, groeck, tzungbi, dtor, chrome-platform, linux-kernel
Hello:
This patch was applied to chrome-platform/linux.git (for-kernelci)
by Tzung-Bi Shih <tzungbi@kernel.org>:
On Wed, 26 Jul 2023 18:17:39 +0000 you wrote:
> Perform a filesystem sync when an EC panic is reported. The
> sync is performed twice in case some inodes or pages are
> temporarily locked. Testing showed syncing twice significantly
> improved reliability.
>
> hw_protection_shutdown is replaced for a couple reasons. It is
> unnecessary because the EC will force reset either way.
> hw_protection_shutdown does not reliably sync filesystem
> before shutting down.
>
> [...]
Here is the summary with links:
- platform/chrome: cros_ec_lpc: Sync filesystem on EC panic
https://git.kernel.org/chrome-platform/c/0a329167220a
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] platform/chrome: cros_ec_lpc: Sync filesystem on EC panic
2023-07-26 18:17 [PATCH] platform/chrome: cros_ec_lpc: Sync filesystem on EC panic Rob Barnes
2023-07-28 2:00 ` patchwork-bot+chrome-platform
@ 2023-07-31 10:10 ` patchwork-bot+chrome-platform
2023-08-02 18:16 ` Rob Barnes
1 sibling, 1 reply; 5+ messages in thread
From: patchwork-bot+chrome-platform @ 2023-07-31 10:10 UTC (permalink / raw)
To: Rob Barnes; +Cc: bleung, groeck, tzungbi, dtor, chrome-platform, linux-kernel
Hello:
This patch was applied to chrome-platform/linux.git (for-next)
by Tzung-Bi Shih <tzungbi@kernel.org>:
On Wed, 26 Jul 2023 18:17:39 +0000 you wrote:
> Perform a filesystem sync when an EC panic is reported. The
> sync is performed twice in case some inodes or pages are
> temporarily locked. Testing showed syncing twice significantly
> improved reliability.
>
> hw_protection_shutdown is replaced for a couple reasons. It is
> unnecessary because the EC will force reset either way.
> hw_protection_shutdown does not reliably sync filesystem
> before shutting down.
>
> [...]
Here is the summary with links:
- platform/chrome: cros_ec_lpc: Sync filesystem on EC panic
https://git.kernel.org/chrome-platform/c/0a329167220a
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] platform/chrome: cros_ec_lpc: Sync filesystem on EC panic
2023-07-31 10:10 ` patchwork-bot+chrome-platform
@ 2023-08-02 18:16 ` Rob Barnes
2023-08-03 0:19 ` Tzung-Bi Shih
0 siblings, 1 reply; 5+ messages in thread
From: Rob Barnes @ 2023-08-02 18:16 UTC (permalink / raw)
To: patchwork-bot+chrome-platform
Cc: bleung, groeck, tzungbi, dtor, chrome-platform, linux-kernel
Note: This change is being rejected upstream due to the use of
ksys_sync_helper. Apparently it's discouraged. I sent a new patch to
replace this one:
https://lore.kernel.org/lkml/20230802175847.1.Ie9fc53b6a1f4c6661c5376286a50e0cf51b3e961@changeid/
On Mon, Jul 31, 2023 at 4:10 AM
<patchwork-bot+chrome-platform@kernel.org> wrote:
>
> Hello:
>
> This patch was applied to chrome-platform/linux.git (for-next)
> by Tzung-Bi Shih <tzungbi@kernel.org>:
>
> On Wed, 26 Jul 2023 18:17:39 +0000 you wrote:
> > Perform a filesystem sync when an EC panic is reported. The
> > sync is performed twice in case some inodes or pages are
> > temporarily locked. Testing showed syncing twice significantly
> > improved reliability.
> >
> > hw_protection_shutdown is replaced for a couple reasons. It is
> > unnecessary because the EC will force reset either way.
> > hw_protection_shutdown does not reliably sync filesystem
> > before shutting down.
> >
> > [...]
>
> Here is the summary with links:
> - platform/chrome: cros_ec_lpc: Sync filesystem on EC panic
> https://git.kernel.org/chrome-platform/c/0a329167220a
>
> You are awesome, thank you!
> --
> Deet-doot-dot, I am a bot.
> https://korg.docs.kernel.org/patchwork/pwbot.html
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] platform/chrome: cros_ec_lpc: Sync filesystem on EC panic
2023-08-02 18:16 ` Rob Barnes
@ 2023-08-03 0:19 ` Tzung-Bi Shih
0 siblings, 0 replies; 5+ messages in thread
From: Tzung-Bi Shih @ 2023-08-03 0:19 UTC (permalink / raw)
To: Rob Barnes
Cc: patchwork-bot+chrome-platform, bleung, groeck, dtor,
chrome-platform, linux-kernel
On Wed, Aug 02, 2023 at 12:16:35PM -0600, Rob Barnes wrote:
> Note: This change is being rejected upstream due to the use of
> ksys_sync_helper. Apparently it's discouraged. I sent a new patch to
> replace this one:
> https://lore.kernel.org/lkml/20230802175847.1.Ie9fc53b6a1f4c6661c5376286a50e0cf51b3e961@changeid/
Do you have any links about the rejection?
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-08-03 0:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-26 18:17 [PATCH] platform/chrome: cros_ec_lpc: Sync filesystem on EC panic Rob Barnes
2023-07-28 2:00 ` patchwork-bot+chrome-platform
2023-07-31 10:10 ` patchwork-bot+chrome-platform
2023-08-02 18:16 ` Rob Barnes
2023-08-03 0:19 ` Tzung-Bi Shih
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).