Re: [PATCH v2 bpf-next 2/4] bpf: Add support for sleepable programs in bpf_iter_run_prog

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

 



Hi Alexei,

> Pretty cool that a single 'if' is all that is needed to enable
> sleepable iterators.
> 
> Maybe combine under one 'if' ?
> if (prog->aux->sleepable) {
>   lock_trace
>   migr_dis
>   might_fault
>   bpf_prog_run
>   migr_en
>   unlock_trace
> } else {
>   lock
>   migr_dis
>   bpf_prog_run
>   migr_end
>   unlock
> }
>
> Would it be easier to read?

Yes, I agree, that is more readable. I'll make the change. I'll also
follow Yonghong Song's suggestion (offline) of merging this patch into
the first patch to keep bisectability together.

Thanks for the feedback!

Kenny




[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