public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@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 0/2] PF_flags cleaups
Date: Mon, 20 Sep 2010 17:58:59 +0200	[thread overview]
Message-ID: <1284998339.2275.738.camel@laptop> (raw)
In-Reply-To: <AANLkTinjVNddRYDUBnVZ67QDEPGrpj4dmW5BMwq2+ozP@mail.gmail.com>

On Mon, 2010-09-20 at 08:40 -0700, Linus Torvalds wrote:
> On Mon, Sep 20, 2010 at 8:13 AM, Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
> > Because we recently ran out of PF_flags, try and clean up.
> >
> > Patches are on top of -tip, which already includes the PF_ALIGNWARN
> > removal.
> 
> Looks ok by me conceptually, but I _really_ hate the naming of that
> second patch and the pointless churn.
> 

> and look how much straightforward it would have been had you just kept
> the same simple semantics with just a new field:
> 
> -       new_flags &= ~(PF_SUPERPRIV | PF_WQ_WORKER);
> +       new_type &= ~(TT_SUPERPRIV | TT_WQ_WORKER);
> 
> and nobody could possibly have any objections to a straightforward
> "move the task type flags into a separate field" patch.

Sure, can do. Like said, my initial approach was to compress these type
bits into fewer bits by converting all these individual bits (PF_KSWAPD,
PF_WQ_WORKER, etc) into a linear range which spans less bits.

But indeed, if we're OK with adding a new field (which is I think the
biggest question, and your reply seems imply you don't mind at all),
then keeping the old structure and moving them over to a new field will
generate a much saner patch.

(I only left the helper functions in in case people would object to
adding another field and we'd need to really compress bits again).

One point though, I noticed we actually expose p->flags to userspace,
which basically makes PF_flags an ABI, do we care?

  reply	other threads:[~2010-09-20 15:59 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
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 [this message]
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=1284998339.2275.738.camel@laptop \
    --to=peterz@infradead.org \
    --cc=akpm@linux-foundation.org \
    --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