public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf v2 0/2] Wait for busy refill_work when destroying bpf memory allocator
@ 2022-10-21 11:49 Hou Tao
  2022-10-21 11:49 ` [PATCH bpf v2 1/2] bpf: " Hou Tao
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Hou Tao @ 2022-10-21 11:49 UTC (permalink / raw)
  To: bpf, Alexei Starovoitov, Stanislav Fomichev
  Cc: Martin KaFai Lau, Andrii Nakryiko, Song Liu, Hao Luo,
	Yonghong Song, Daniel Borkmann, KP Singh, Jiri Olsa,
	John Fastabend, houtao1

From: Hou Tao <houtao1@huawei.com>

Hi,

The patchset aims to fix one problem of bpf memory allocator destruction
when there is PREEMPT_RT kernel or kernel with arch_irq_work_has_interrupt()
being false (e.g. 1-cpu arm32 host or mips). The root cause is that
there may be busy refill_work when the allocator is destroying and it
may incur oops or other problems as shown in patch #1. Patch #1 fixes
the problem by waiting for the completion of irq work during destroying
and patch #2 is just a clean-up patch based on patch #1. Please see
individual patches for more details.

Comments are always welcome.

Change Log:
v2:
  * patch 1: fix typos and add notes about the overhead of irq_work_sync()
  * patch 1 & 2: add Acked-by tags from sdf@google.com

v1: https://lore.kernel.org/bpf/20221019115539.983394-1-houtao@huaweicloud.com/T/#t

Hou Tao (2):
  bpf: Wait for busy refill_work when destroying bpf memory allocator
  bpf: Use __llist_del_all() whenever possbile during memory draining

 kernel/bpf/memalloc.c | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

-- 
2.29.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-10-22  2:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-21 11:49 [PATCH bpf v2 0/2] Wait for busy refill_work when destroying bpf memory allocator Hou Tao
2022-10-21 11:49 ` [PATCH bpf v2 1/2] bpf: " Hou Tao
2022-10-21 11:49 ` [PATCH bpf v2 2/2] bpf: Use __llist_del_all() whenever possbile during memory draining Hou Tao
2022-10-22  2:30 ` [PATCH bpf v2 0/2] Wait for busy refill_work when destroying bpf memory allocator patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox