public inbox for [email protected]
 help / color / mirror / Atom feed
* Re: [PATCH] Document that PF_KTHREAD _is_ ABI
       [not found]     ` <[email protected]>
@ 2021-04-01 15:05       ` Stefan Metzmacher
  0 siblings, 0 replies; only message in thread
From: Stefan Metzmacher @ 2021-04-01 15:05 UTC (permalink / raw)
  To: Alexey Dobriyan, Christoph Hellwig, Jens Axboe
  Cc: Andy Lutomirski, Andrew Morton, LKML, Linux API, fw, io-uring


Am 31.03.21 um 21:23 schrieb Alexey Dobriyan:
> On Mon, Mar 22, 2021 at 07:53:10AM +0000, Christoph Hellwig wrote:
>> On Sat, Mar 20, 2021 at 10:23:12AM -0700, Andy Lutomirski wrote:
>>>> https://github.com/systemd/systemd/blob/main/src/basic/process-util.c#L354
>>>> src/basic/process-util.c:is_kernel_thread()
>>>
>>> Eww.
>>>
>>> Could we fix it differently and more permanently by modifying the proc
>>> code to display the values systemd expects?
>>
>> Yes, do_task_stat needs a mapping from kernel flags to UABI flags.  And
>> we should already discard everything we think we can from the UABI
>> now, and only add the ones back that are required to not break
>> userspace.
> 
> Sure we do. Who is going to find all the flags? I found PF_KTHREAD. :^)
> 
> More seriously,
> 
> /proc/$pid/stat was expanded to include tsk->flags in 0.99.1 (!!!)
> 
> Developers kept adding and shuffling flags probably not even realising
> what's going on. The last incident happened at 5.10 when PF_IO_WORKER
> was exchanged with PF_VCPU for smaller codegen.

With the create_io_thread(), the impact of PF_IO_WORKER becomes more broadly
visible and userspace might start to look at it in order to find the difference
between userspace and kernel io threads. (I also think it should actually be renamed to
PF_IO_THREAD...)

Jens, what do you think about that?

metze

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-01 17:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <[email protected]>
     [not found] ` <CALCETrUPAvUOr8V5db0gu5RKVftKFwbBEkh6Aob57v+D-xdEig@mail.gmail.com>
     [not found]   ` <[email protected]>
     [not found]     ` <[email protected]>
2021-04-01 15:05       ` [PATCH] Document that PF_KTHREAD _is_ ABI Stefan Metzmacher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox