Re: [PATCH] bpf: add bpf_msleep_interruptible()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 5 May 2025 at 21:07, Song Liu <song@xxxxxxxxxx> wrote:
>
> On Sun, May 4, 2025 at 11:40 PM Sergey Senozhatsky
> <senozhatsky@xxxxxxxxxxxx> wrote:
> >
> > bpf_msleep_interruptible() puts a calling context into an
> > interruptible sleep.  This function is expected to be used
> > for testing only (perhaps in conjunction with fault-injection)
> > to simulate various execution delays or timeouts.
>
> Please keep in mind that BPF programs run in not sleepable
> contexts, including NMIs. Maybe udelay() is a better option?

Or mark the kfunc KF_SLEEPABLE, IIUC the intention is to use it from
hooks which are sleepable.

>
> Thanks,
> Song
>





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux