From: Jens Axboe <[email protected]>
To: Christian Brauner <[email protected]>
Cc: [email protected], [email protected], [email protected]
Subject: Re: [PATCH 4/5] exit: add internal include file with helpers
Date: Fri, 14 Jul 2023 14:21:08 -0600 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
On 7/14/23 2:16?PM, Jens Axboe wrote:
> On 7/14/23 9:38?AM, Christian Brauner wrote:
>>> diff --git a/kernel/exit.h b/kernel/exit.h
>>> new file mode 100644
>>> index 000000000000..f10207ba1341
>>> --- /dev/null
>>> +++ b/kernel/exit.h
>>> @@ -0,0 +1,30 @@
>>> +// SPDX-License-Identifier: GPL-2.0-only
>>> +#ifndef LINUX_WAITID_H
>>> +#define LINUX_WAITID_H
>>> +
>>> +struct waitid_info {
>>> + pid_t pid;
>>> + uid_t uid;
>>> + int status;
>>> + int cause;
>>> +};
>>> +
>>> +struct wait_opts {
>>> + enum pid_type wo_type;
>>> + int wo_flags;
>>> + struct pid *wo_pid;
>>> +
>>> + struct waitid_info *wo_info;
>>> + int wo_stat;
>>> + struct rusage *wo_rusage;
>>> +
>>> + wait_queue_entry_t child_wait;
>>> + int notask_error;
>>> +};
>>> +
>>> +bool pid_child_should_wake(struct wait_opts *wo, struct task_struct *p);
>>> +long __do_wait(struct wait_opts *wo);
>>> +int kernel_waitid_prepare(struct wait_opts *wo, int which, pid_t upid,
>>> + struct waitid_info *infop, int options,
>>> + struct rusage *ru, unsigned int *f_flags);
>>
>> I know this isn't your mess obviously but could you try and see whether
>> you can expose a nicer, dedicated struct and helper suited to io_uring's
>> needs instead of exposing the messy kernel/exit.c format?
>
> From a quick look, I think the wait_opts is pretty much what we need,
> not much to cut from that. For waitid_info, we can make do with just a
> forward declaration, we don't need the whole thing.
I'm wrong obviously, we do need waitid_info as well as that is the
output side... Seems to me that none of them have anything redundant wrt
io_uring. They could be combined into one thing, but is it worth it?
--
Jens Axboe
next prev parent reply other threads:[~2023-07-14 20:21 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-11 20:43 [PATCHSET 0/5] Add io_uring support for waitid Jens Axboe
2023-07-11 20:43 ` [PATCH 1/5] exit: abtract out should_wake helper for child_wait_callback() Jens Axboe
2023-07-14 15:31 ` Christian Brauner
2023-07-11 20:43 ` [PATCH 2/5] exit: move core of do_wait() into helper Jens Axboe
2023-07-14 15:32 ` Christian Brauner
2023-07-11 20:43 ` [PATCH 3/5] exit: add kernel_waitid_prepare() helper Jens Axboe
2023-07-11 20:43 ` [PATCH 4/5] exit: add internal include file with helpers Jens Axboe
2023-07-14 15:38 ` Christian Brauner
2023-07-14 20:16 ` Jens Axboe
2023-07-14 20:21 ` Jens Axboe [this message]
2023-07-11 20:43 ` [PATCH 5/5] io_uring: add IORING_OP_WAITID support Jens Axboe
2023-07-11 21:11 ` Arnd Bergmann
2023-07-11 21:22 ` Jens Axboe
2023-07-11 22:18 ` Jens Axboe
2023-07-14 15:47 ` Christian Brauner
2023-07-14 18:33 ` Arnd Bergmann
2023-07-14 20:14 ` Jens Axboe
2023-07-15 7:12 ` Arnd Bergmann
2023-07-15 14:06 ` Jens Axboe
2023-07-15 14:34 ` Jens Axboe
2023-07-15 20:23 ` Jens Axboe
-- strict thread matches above, loose matches on Subject: below --
2023-08-02 23:14 [PATCHSET v2] Add io_uring support for waitid Jens Axboe
2023-08-02 23:14 ` [PATCH 4/5] exit: add internal include file with helpers Jens Axboe
2023-08-11 14:16 [PATCHSET v3 0/5] Add io_uring support for waitid Jens Axboe
2023-08-11 14:16 ` [PATCH 4/5] exit: add internal include file with helpers Jens Axboe
2023-09-09 15:11 [PATCHSET v4 0/5] Add io_uring support for waitid Jens Axboe
2023-09-09 15:11 ` [PATCH 4/5] exit: add internal include file with helpers Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox