From: Zhu Yanjun <yanjun.zhu@linux.dev>
To: Bart Van Assche <bvanassche@acm.org>,
leon@kernel.org, linux-rdma@vger.kernel.org,
shinichiro.kawasaki@wdc.com, Jason Gunthorpe <jgg@nvidia.com>
Cc: kernel test robot <oliver.sang@intel.com>
Subject: Re: [PATCH 1/1] RDMA/iwcm: Fix WARNING:at_kernel/workqueue.c:#check_flush_dependency
Date: Tue, 20 Aug 2024 06:42:20 +0800 [thread overview]
Message-ID: <95060a8e-d155-4dad-9aac-4d14e4190537@linux.dev> (raw)
In-Reply-To: <092913a6-c898-4258-90ca-926d6864d005@acm.org>
在 2024/8/20 3:28, Bart Van Assche 写道:
> On 8/17/24 1:42 AM, Zhu Yanjun wrote:
>> When workqueue_flush is invoked, WQ_MEM_RECLAIM is checked to avoid
>> errors.
>
> This description is too brief and not entirely correct. In the
> description of this patch it should be explained that WQ_MEM_RECLAIM
> must be set for workqueues that are flushed from a work item queued on
> a WQ_MEM_RECLAIM workqueue or from a memory reclaim context. Otherwise a
> deadlock can occur. From kernel/workqueue.c:
Yeah. I will make changes to the commit logs based on the above comments.
Thanks for your advice.
>
> /**
> * check_flush_dependency - check for flush dependency sanity
> * @target_wq: workqueue being flushed
> * @target_work: work item being flushed (NULL for workqueue flushes)
> *
> * %current is trying to flush the whole @target_wq or @target_work on
> it.
> * If @target_wq doesn't have %WQ_MEM_RECLAIM, verify that %current is
> not
> * reclaiming memory or running on a workqueue which doesn't have
> * %WQ_MEM_RECLAIM as that can break forward-progress guarantee
> leading to
> * a deadlock.
> */
>
>> Reported-by: kernel test robot <oliver.sang@intel.com>
>> Closes:
>> https://lore.kernel.org/oe-lkp/202408151633.fc01893c-oliver.sang@intel.com
>> Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
>
> Since this is a fix, please include a "Fixes:" tag.
Got it. I will add a "Fixes:" tag.
Best Regards,
Zhu Yanjun
>
> Thanks,
>
> Bart.
>
--
Best Regards,
Yanjun.Zhu
prev parent reply other threads:[~2024-08-19 22:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-17 8:42 [PATCH 1/1] RDMA/iwcm: Fix WARNING:at_kernel/workqueue.c:#check_flush_dependency Zhu Yanjun
2024-08-19 18:38 ` Jason Gunthorpe
2024-08-19 22:38 ` Zhu Yanjun
2024-08-19 19:28 ` Bart Van Assche
2024-08-19 22:42 ` Zhu Yanjun [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=95060a8e-d155-4dad-9aac-4d14e4190537@linux.dev \
--to=yanjun.zhu@linux.dev \
--cc=bvanassche@acm.org \
--cc=jgg@nvidia.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=oliver.sang@intel.com \
--cc=shinichiro.kawasaki@wdc.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.