virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Mike Christie <michael.christie@oracle.com>
To: hch@infradead.org, stefanha@redhat.com, jasowang@redhat.com,
	mst@redhat.com, sgarzare@redhat.com,
	virtualization@lists.linux-foundation.org, brauner@kernel.org,
	ebiederm@xmission.com, linux-kernel@vger.kernel.org
Subject: [PATCH V9 5/8] fork: allow kernel code to call copy_process
Date: Thu, 12 May 2022 16:47:01 -0500	[thread overview]
Message-ID: <20220512214704.104472-6-michael.christie@oracle.com> (raw)
In-Reply-To: <20220512214704.104472-1-michael.christie@oracle.com>

The next patch adds helpers like create_io_thread, but for use by the
vhost layer. There are several functions, so they are in their own file
instead of cluttering up fork.c. This patch allows that new file to
call copy_process.

Signed-off-by: Mike Christie <michael.christie@oracle.com>
---
 include/linux/sched/task.h | 2 ++
 kernel/fork.c              | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/linux/sched/task.h b/include/linux/sched/task.h
index 9fbb489b2512..ec4a0097fe4c 100644
--- a/include/linux/sched/task.h
+++ b/include/linux/sched/task.h
@@ -93,6 +93,8 @@ extern void exit_files(struct task_struct *);
 extern void exit_itimers(struct signal_struct *);
 
 extern pid_t kernel_clone(struct kernel_clone_args *kargs);
+struct task_struct *copy_process(struct pid *pid, int trace, int node,
+				 struct kernel_clone_args *args);
 struct task_struct *create_io_thread(int (*fn)(void *), void *arg, int node);
 struct task_struct *fork_idle(int);
 struct mm_struct *copy_init_mm(void);
diff --git a/kernel/fork.c b/kernel/fork.c
index 84346fa6232e..cdb385dd6c1e 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1975,7 +1975,7 @@ static void copy_oom_score_adj(u64 clone_flags, struct task_struct *tsk)
  * parts of the process environment (as per the clone
  * flags). The actual kick-off is left to the caller.
  */
-static __latent_entropy struct task_struct *copy_process(
+__latent_entropy struct task_struct *copy_process(
 					struct pid *pid,
 					int trace,
 					int node,
-- 
2.25.1

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

  parent reply	other threads:[~2022-05-12 21:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-12 21:46 [PATCH V9 0/8] Use copy_process in vhost layer Mike Christie
2022-05-12 21:46 ` [PATCH V9 1/8] fork: Make IO worker options flag based Mike Christie
2022-05-12 21:46 ` [PATCH V9 2/8] fork/vm: Move common PF_IO_WORKER behavior to new flag Mike Christie
2022-05-12 21:46 ` [PATCH V9 3/8] fork: add USER_WORKER flag to not dup/clone files Mike Christie
2022-05-12 21:47 ` [PATCH V9 4/8] fork: Add USER_WORKER flag to ignore signals Mike Christie
2022-05-12 21:47 ` Mike Christie [this message]
2022-05-12 21:47 ` [PATCH V9 6/8] vhost_task: Allow vhost layer to use copy_process Mike Christie
2022-05-12 21:47 ` [PATCH V9 7/8] vhost: move worker thread fields to new struct Mike Christie
2022-05-12 21:47 ` [PATCH V9 8/8] vhost: use vhost_tasks for worker threads Mike Christie
2022-05-31 16:18 ` [PATCH V9 0/8] Use copy_process in vhost layer Michael S. Tsirkin
2022-06-01 21:21 ` michael.christie

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 \
    --in-reply-to=20220512214704.104472-6-michael.christie@oracle.com \
    --to=michael.christie@oracle.com \
    --cc=brauner@kernel.org \
    --cc=ebiederm@xmission.com \
    --cc=hch@infradead.org \
    --cc=jasowang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=sgarzare@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    /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;
as well as URLs for NNTP newsgroup(s).