From: Simon Horman <horms@kernel.org>
To: Konstantin Khorenko <khorenko@virtuozzo.com>
Cc: Simon Horman <simon.horman@corigine.com>,
Jakub Kicinski <kuba@kernel.org>,
Manish Chopra <manishc@marvell.com>,
Ariel Elior <aelior@marvell.com>,
David Miller <davem@davemloft.net>,
Sudarsana Kalluru <skalluru@marvell.com>,
netdev@vger.kernel.org, Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH v2 1/1] qed: Fix scheduling in a tasklet while getting stats
Date: Sat, 29 Jul 2023 13:07:38 +0200 [thread overview]
Message-ID: <ZMTy+lpSimgR66jh@kernel.org> (raw)
In-Reply-To: <20230727152609.1633966-2-khorenko@virtuozzo.com>
On Thu, Jul 27, 2023 at 06:26:09PM +0300, Konstantin Khorenko wrote:
> Here we've got to a situation when tasklet called usleep_range() in PTT
> acquire logic, thus welcome to the "scheduling while atomic" BUG().
>
> BUG: scheduling while atomic: swapper/24/0/0x00000100
>
> [<ffffffffb41c6199>] schedule+0x29/0x70
> [<ffffffffb41c5512>] schedule_hrtimeout_range_clock+0xb2/0x150
> [<ffffffffb41c55c3>] schedule_hrtimeout_range+0x13/0x20
> [<ffffffffb41c3bcf>] usleep_range+0x4f/0x70
> [<ffffffffc08d3e58>] qed_ptt_acquire+0x38/0x100 [qed]
> [<ffffffffc08eac48>] _qed_get_vport_stats+0x458/0x580 [qed]
> [<ffffffffc08ead8c>] qed_get_vport_stats+0x1c/0xd0 [qed]
> [<ffffffffc08dffd3>] qed_get_protocol_stats+0x93/0x100 [qed]
> qed_mcp_send_protocol_stats
> case MFW_DRV_MSG_GET_LAN_STATS:
> case MFW_DRV_MSG_GET_FCOE_STATS:
> case MFW_DRV_MSG_GET_ISCSI_STATS:
> case MFW_DRV_MSG_GET_RDMA_STATS:
> [<ffffffffc08e36d8>] qed_mcp_handle_events+0x2d8/0x890 [qed]
> qed_int_assertion
> qed_int_attentions
> [<ffffffffc08d9490>] qed_int_sp_dpc+0xa50/0xdc0 [qed]
> [<ffffffffb3aa7623>] tasklet_action+0x83/0x140
> [<ffffffffb41d9125>] __do_softirq+0x125/0x2bb
> [<ffffffffb41d560c>] call_softirq+0x1c/0x30
> [<ffffffffb3a30645>] do_softirq+0x65/0xa0
> [<ffffffffb3aa78d5>] irq_exit+0x105/0x110
> [<ffffffffb41d8996>] do_IRQ+0x56/0xf0
>
> Fix this by making caller to provide the context whether it could be in
> atomic context flow or not when getting stats from QED driver.
> QED driver based on the context provided decide to schedule out or not
> when acquiring the PTT BAR window.
>
> We faced the BUG_ON() while getting vport stats, but according to the
> code same issue could happen for fcoe and iscsi statistics as well, so
> fixing them too.
>
> Fixes: 6c75424612a7 ("qed: Add support for NCSI statistics.")
> Fixes: 1e128c81290a ("qed: Add support for hardware offloaded FCoE.")
> Fixes: 2f2b2614e893 ("qed: Provide iSCSI statistics to management")
> Cc: Sudarsana Kalluru <skalluru@marvell.com>
> Cc: David Miller <davem@davemloft.net>
> Cc: Manish Chopra <manishc@marvell.com>
>
nit: no blank line here.
> Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
Reviewed-by: Simon Horman <horms@kernel.org>
next prev parent reply other threads:[~2023-07-29 11:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-26 17:19 [PATCH 0/1] qed: Yet another scheduling while atomic fix Konstantin Khorenko
2023-07-26 17:19 ` [PATCH 1/1] qed: Fix scheduling in a tasklet while getting stats Konstantin Khorenko
2023-07-27 11:59 ` Simon Horman
2023-07-27 15:26 ` [PATCH v2 0/1] qed: Yet another scheduling while atomic fix Konstantin Khorenko
2023-07-27 15:26 ` [PATCH v2 1/1] qed: Fix scheduling in a tasklet while getting stats Konstantin Khorenko
2023-07-29 11:07 ` Simon Horman [this message]
2023-07-29 16:20 ` [PATCH v2 0/1] qed: Yet another scheduling while atomic fix patchwork-bot+netdevbpf
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=ZMTy+lpSimgR66jh@kernel.org \
--to=horms@kernel.org \
--cc=aelior@marvell.com \
--cc=davem@davemloft.net \
--cc=khorenko@virtuozzo.com \
--cc=kuba@kernel.org \
--cc=manishc@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=simon.horman@corigine.com \
--cc=skalluru@marvell.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;
as well as URLs for NNTP newsgroup(s).