Re: [PATCH bpf v3 2/2] selftests/bpf: Add test for unpinning htab with internal timer struct

KaFai Wan
2025-10-11T15:09:54Z

On Fri, 2025-10-10 at 10:28 -0700, Alexei Starovoitov wrote:
> On Wed, Oct 8, 2025 at 3:27 AM KaFai Wan <kafai.wan@linux.dev> wrote:
> >
> > Add test to verify that unpinning hash tables containing internal timer
> > structures does not trigger context warnings.
> >
> > Each subtest (timer_prealloc and timer_no_prealloc) can trigger the
> > context warning when unpinning, but the warning cannot be triggered
> > twice within a short time interval (a HZ), which is expected behavior.
>
> It was difficult to decipher the above paragraph.
> I think you're referring to throttling logic in __might_resched().
>
> I kept it as-is while applying, but in the future either skip
> such low level implementation detail or expand it.
> Here you could have said that the error is printed by __might_resched()
> which prints it once a HZ.

OK, I understand. Thanks for your feedback and guidance.

--
Thanks,
KaFai