public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org, Mike Travis <travis@sgi.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 3/6] cpumask: truncate task_struct.cpus_allowed for CONFIG_CPUMASK_OFFSTACK
Date: Wed, 25 Nov 2009 22:03:28 +1030	[thread overview]
Message-ID: <200911252203.28343.rusty@rustcorp.com.au> (raw)
In-Reply-To: <20091123231440.GA13221@elte.hu>

On Tue, 24 Nov 2009 09:44:40 am Ingo Molnar wrote:
> There's also the problem of cache footprint - we really want to freedom 
> to place the masks (which are not off-stack in the regular case) 
> anywhere in task struct - and task-struct is huge, so cache placement 
> matters.

My initial patch changed it to always be a const cpumask *, with it
pointing to the standard all or single-cpu masks in the normal cases: it
only got its own allocated if we changed it to something unusual.

It was more invasive though, and really needs to be thought about separately.
I'd want to measure how often it is accessed, for example.

> Is the ptr deref really a big problem for off-stack?

I don't think so; slightly suboptimal codegen but it'll still just point to
the end of the struct.

> Changing all users isnt a problem as long as it still looks like a clean 
> data structure with clean usage.

We're still supposed to use a wrapper to avoid a flag day.  It's gratuitous
if we're going to do this, but that's modern kernel life AFAICT.

> Those end-of-struct tricks we play with cpumasks make me really a bit uneasy.

Fair enough.

I don't know when I'll get more cycles on this.  A few more months I expect.

Rusty.

      reply	other threads:[~2009-11-25 11:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-19  9:00 [PATCH 3/6] cpumask: truncate task_struct.cpus_allowed for CONFIG_CPUMASK_OFFSTACK Rusty Russell
2009-11-23 18:23 ` Ingo Molnar
2009-11-23 22:48   ` Rusty Russell
2009-11-23 23:14     ` Ingo Molnar
2009-11-25 11:33       ` Rusty Russell [this message]

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=200911252203.28343.rusty@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=torvalds@linux-foundation.org \
    --cc=travis@sgi.com \
    /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