From: David Decotigny <decot+git@google.com>
To: linux-kernel@vger.kernel.org
Cc: Miquel Raynal <miquel.raynal@bootlin.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
linux-mtd@lists.infradead.org,
David Decotigny <ddecotig@google.com>
Subject: [PATCH RFC v1 1/1] mtd_blkdevs: avoid soft lockups with some mtd/spi devices
Date: Wed, 26 Jan 2022 00:57:35 -0800 [thread overview]
Message-ID: <20220126085735.575625-1-decot+git@google.com> (raw)
From: David Decotigny <ddecotig@google.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@google.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
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
WARNING: multiple messages have this Message-ID (diff)
From: David Decotigny <decot+git@google.com>
To: linux-kernel@vger.kernel.org
Cc: Miquel Raynal <miquel.raynal@bootlin.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
linux-mtd@lists.infradead.org,
David Decotigny <ddecotig@google.com>
Subject: [PATCH RFC v1 1/1] mtd_blkdevs: avoid soft lockups with some mtd/spi devices
Date: Wed, 26 Jan 2022 00:57:35 -0800 [thread overview]
Message-ID: <20220126085735.575625-1-decot+git@google.com> (raw)
From: David Decotigny <ddecotig@google.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@google.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
next reply other threads:[~2022-01-26 8:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-26 8:57 David Decotigny [this message]
2022-01-26 8:57 ` [PATCH RFC v1 1/1] mtd_blkdevs: avoid soft lockups with some mtd/spi devices David Decotigny
2022-01-26 9:08 ` Richard Weinberger
2022-01-26 9:08 ` Richard Weinberger
[not found] ` <CAG88wWZYbMLYRa9iebAeWtBdLtNWdL4djbPRq36EHrXeNzMsiw@mail.gmail.com>
2022-01-26 9:43 ` Richard Weinberger
2022-01-26 9:43 ` Richard Weinberger
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=20220126085735.575625-1-decot+git@google.com \
--to=decot+git@google.com \
--cc=ddecotig@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=vigneshr@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.