From: Andrew Morton <akpm@linux-foundation.org>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
linux-kernel@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
Tejun Heo <tj@kernel.org>, Avi Kivity <avi@redhat.com>
Subject: Re: [RFC][PATCH 2/2] kernel: extract thread types from task_struct::flags
Date: Mon, 20 Sep 2010 12:14:46 -0700 [thread overview]
Message-ID: <20100920121446.18fb3a65.akpm@linux-foundation.org> (raw)
In-Reply-To: <20100920151839.414197086@chello.nl>
On Mon, 20 Sep 2010 17:13:36 +0200
Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
> Free up a few more PF_flags by moving thread types out to their own variable.
>
> Initially I compressed the types into less bits inside task_struct::flags, but
> Thomas suggested I move them to their own field.
>
There doesn't seem to be a huge point to all this, but I guess there's
some sense in separating "what type of thread this is" from "attributes
of this thread". Maybe. At the expense of a larger task_struct.
> +/*
> + * Types >= tt_kernel imply the old PF_KTHREAD
> + */
Perhaps that should be encapsulated into another helper function
> --- linux-2.6.orig/kernel/fork.c
> +++ linux-2.6/kernel/fork.c
> @@ -570,7 +570,7 @@ struct mm_struct *get_task_mm(struct tas
> task_lock(task);
> mm = task->mm;
> if (mm) {
> - if (task->flags & PF_KTHREAD)
> + if (task_type(task) >= tt_kernel)
rather than open-coded everywhere.
next prev parent reply other threads:[~2010-09-20 19:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-20 15:13 [RFC][PATCH 0/2] PF_flags cleaups Peter Zijlstra
2010-09-20 15:13 ` [RFC][PATCH 1/2] kernel: remove PF_FLUSHER Peter Zijlstra
2010-09-20 17:27 ` Jens Axboe
2010-09-20 15:13 ` [RFC][PATCH 2/2] kernel: extract thread types from task_struct::flags Peter Zijlstra
2010-09-20 19:14 ` Andrew Morton [this message]
2010-09-20 19:25 ` Peter Zijlstra
2010-09-20 19:41 ` Andrew Morton
2010-09-20 15:40 ` [RFC][PATCH 0/2] PF_flags cleaups Linus Torvalds
2010-09-20 15:58 ` Peter Zijlstra
2010-09-20 16:15 ` Linus Torvalds
2010-09-20 18:03 ` Peter Zijlstra
2010-09-20 18:19 ` Linus Torvalds
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=20100920121446.18fb3a65.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=a.p.zijlstra@chello.nl \
--cc=avi@redhat.com \
--cc=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
--cc=torvalds@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
Powered by JetHome