[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAENh_SQDBOR28qZWzC_ns=H8i9EHzOB8w2xc2YWReKa21PYsgg@mail.gmail.com>
Date: Wed, 2 Jul 2025 14:54:58 +0100
From: Matt Fleming <matt@...dmodwrite.com>
To: Andrey Konovalov <andreyknvl@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, linux-kernel@...r.kernel.org,
kernel-team@...udflare.com, Marco Elver <elver@...gle.com>,
Alexander Potapenko <glider@...gle.com>, Dmitry Vyukov <dvyukov@...gle.com>,
Oscar Salvador <osalvador@...e.de>, Vlastimil Babka <vbabka@...e.cz>,
Matt Fleming <mfleming@...udflare.com>
Subject: Re: [PATCH] stackdepot: Make max number of pools build-time configurable
On Wed, Jun 11, 2025 at 1:21 PM Matt Fleming <matt@...dmodwrite.com> wrote:
>
> On Tue, Jun 10, 2025 at 5:09 PM Andrey Konovalov <andreyknvl@...il.com> wrote:
> >
> > On Tue, Jun 10, 2025 at 1:16 PM Matt Fleming <matt@...dmodwrite.com> wrote:
> > >
> > > From: Matt Fleming <mfleming@...udflare.com>
> > >
> > > We're hitting the WARN in depot_init_pool() about reaching the stack
> > > depot limit. My assumption is because we have long stacks that don't
> > > dedup very well.
> >
> > Note that this might happen if filter_irq_stacks() somehow fails in your setup.
> >
> > See e.g. this:
> >
> > https://lore.kernel.org/all/CA+fCnZdWgAD1pu4yyjON0ph9ae1B6iaWas0CbET+MXLNNXt5Hg@mail.gmail.com/
> > https://lore.kernel.org/all/44140c34-e2bd-4f6e-892c-51469edc8dfb@redhat.com/
>
> Thanks for the tip. I'll double-check if we're hitting a similar issue
> before sending a v2.
Sorry for the delay.
filter_irq_stacks() seems to be working just fine. But I did notice
that we're doing a lot of stuff in softirqs and that might be the
cause of so many unique stack traces, e.g.
kasan_save_stack+0x27/0x4f
__kasan_record_aux_stack+0xad/0xbf
__call_rcu_common.constprop.0+0x70/0x7bf
kmem_cache_free+0x36e/0x55f
__sk_destruct+0x3f8/0x5bf
tcp_v6_rcv+0x31c3/0x3cef
ip6_protocol_deliver_rcu+0x12d/0x115f
ip6_input_finish+0xe8/0x15f
ip6_input+0xca/0x1cf
ipv6_rcv+0x307/0x38f
__netif_receive_skb_one_core+0x11f/0x1af
process_backlog+0x1d2/0x5df
__napi_poll+0xa2/0x43f
__init_scratch_end+0x70a7b79/0x98d00df
__napi_poll+0x5/0x43f
net_rx_action+0x75f/0x18af
handle_softirqs+0x15e/0x52f
do_softirq+0x40/0x5f
__local_bh_enable_ip+0x64/0x6f
__dev_queue_xmit+0x8aa/0x30ff
ip6_finish_output2+0xb96/0x1b2f
ip6_finish_output+0x5d1/0x97f
ip6_output+0x1d6/0x3cf
ip6_xmit+0xaf4/0x199f
inet6_csk_xmit+0x2cf/0x44f
__tcp_transmit_skb+0x1826/0x3bdf
tcp_write_xmit+0x1610/0x794f
__tcp_push_pending_frames+0x94/0x2df
inet_shutdown+0x247/0x31f
__sys_shutdown+0xe9/0x19f
__x64_sys_shutdown+0x53/0x7f
do_syscall_64+0x4b/0x10f
entry_SYSCALL_64_after_hwframe+0x76/0x7d
In fact, nearly 25% of the recorded stacks feature do_softirq(). I
don't think we want to filter these like we do for hard irqs though,
because the information is helpful for debugging.
Thanks,
Matt
Powered by blists - more mailing lists