[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220126085735.575625-1-decot+git@google.com>
Date: Wed, 26 Jan 2022 00:57:35 -0800
From: David Decotigny <decot+git@...gle.com>
To: linux-kernel@...r.kernel.org
Cc: Miquel Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>,
Vignesh Raghavendra <vigneshr@...com>,
linux-mtd@...ts.infradead.org,
David Decotigny <ddecotig@...gle.com>
Subject: [PATCH RFC v1 1/1] mtd_blkdevs: avoid soft lockups with some mtd/spi devices
From: David Decotigny <ddecotig@...gle.com>
With some spi devices, the heavy cpu usage due to polling the spi
registers may lead to netdev timeouts, RCU complaints, etc. This can
be acute in the absence of CONFIG_PREEMPT. This patch allows to give
enough breathing room to avoid those false positives.
Signed-off-by: David Decotigny <ddecotig@...gle.com>
---
I tested this on a 5.10 base (lockdep).
drivers/mtd/mtd_blkdevs.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c
index 243f28a3206b4..64d2b093f114b 100644
--- a/drivers/mtd/mtd_blkdevs.c
+++ b/drivers/mtd/mtd_blkdevs.c
@@ -158,6 +158,7 @@ static void mtd_blktrans_work(struct mtd_blktrans_dev *dev)
}
background_done = 0;
+ cond_resched();
spin_lock_irq(&dev->queue_lock);
}
}
--
2.35.0.rc0.227.g00780c9af4-goog
Powered by blists - more mailing lists