Re: [PATCH v2] seq_file: copy as much as possible to user buffer in seq_read()

From: David Wang
Date: Fri Dec 20 2024 - 11:50:26 EST




At 2024-12-20 22:34:12, "Markus Elfring" <Markus.Elfring@xxxxxx> wrote:
>> seq_read() yields at most seq_file->size bytes to userspace, …
>
> user space?
>
>
>
>> $ strace -T -e read cat /proc/interrupts > /dev/null
>
>> 45 read(3, "", 131072) = 0 <0.000010>
>> On a system with hundreds of cpus, it would need …
>
> CPUs?
>
>
>Is it a bit nicer to separate test output and subsequent comments by blank lines?
>
>
>
>> Fill up user buffer as much as possible in seq_read(), extra read
>> calls can be avoided with a larger user buffer, and 2%~10% performance
>> improvement would be observed:
>Will it help to split such a paragraph into three sentences
>(on separate lines)?
>
>Regards,
>Markus

Thanks for the comments, I will address it later.
Any concern about the code?

David