From: Sasha Levin <sashal@kernel.org>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
virtualization@lists.linux-foundation.org
Subject: Re: [PATCH AUTOSEL 5.12 42/43] virtio: fix up virtio_disable_cb
Date: Sat, 17 Jul 2021 21:41:26 -0400 [thread overview]
Message-ID: <YPOGxjBcq6f4l+0v@sashalap> (raw)
In-Reply-To: <20210711002242-mutt-send-email-mst@kernel.org>
On Sun, Jul 11, 2021 at 12:23:59AM -0400, Michael S. Tsirkin wrote:
>On Sat, Jul 10, 2021 at 07:49:14PM -0400, Sasha Levin wrote:
>> From: "Michael S. Tsirkin" <mst@redhat.com>
>>
>> [ Upstream commit 8d622d21d24803408b256d96463eac4574dcf067 ]
>>
>> virtio_disable_cb is currently a nop for split ring with event index.
>> This is because it used to be always called from a callback when we know
>> device won't trigger more events until we update the index. However,
>> now that we run with interrupts enabled a lot we also poll without a
>> callback so that is different: disabling callbacks will help reduce the
>> number of spurious interrupts.
>> Further, if using event index with a packed ring, and if being called
>> from a callback, we actually do disable interrupts which is unnecessary.
>>
>> Fix both issues by tracking whenever we get a callback. If that is
>> the case disabling interrupts with event index can be a nop.
>> If not the case disable interrupts. Note: with a split ring
>> there's no explicit "no interrupts" value. For now we write
>> a fixed value so our chance of triggering an interupt
>> is 1/ring size. It's probably better to write something
>> related to the last used index there to reduce the chance
>> even further. For now I'm keeping it simple.
>>
>> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>> Signed-off-by: Sasha Levin <sashal@kernel.org>
>
>I am not sure we want this in stable yet. It should in theory
>fix the reported interrupt storms but the reporter is on vacation.
Sure, I'll drop it for now. Let me know when you want it re-added.
Thanks!
--
Thanks,
Sasha
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
prev parent reply other threads:[~2021-07-18 1:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210710234915.3220342-1-sashal@kernel.org>
2021-07-10 23:49 ` [PATCH AUTOSEL 5.12 39/43] virtio-blk: Fix memory leak among suspend/resume procedure Sasha Levin
2021-07-10 23:49 ` [PATCH AUTOSEL 5.12 40/43] virtio_net: Fix error handling in virtnet_restore() Sasha Levin
2021-07-10 23:49 ` [PATCH AUTOSEL 5.12 41/43] virtio_console: Assure used length from device is limited Sasha Levin
2021-07-10 23:49 ` [PATCH AUTOSEL 5.12 42/43] virtio: fix up virtio_disable_cb Sasha Levin
2021-07-11 4:23 ` Michael S. Tsirkin
2021-07-18 1:41 ` Sasha Levin [this message]
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=YPOGxjBcq6f4l+0v@sashalap \
--to=sashal@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=stable@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.org \
/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;
as well as URLs for NNTP newsgroup(s).