All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Christoph Lameter <cl@linux-foundation.org>
Cc: rientjes@google.com, npiggin@suse.de, peterz@infradead.org,
	menage@google.com, dfults@sgi.com, linux-kernel@vger.kernel.org
Subject: Re: [patch 1/7] cpusets: add dirty map to struct address_space
Date: Tue, 4 Nov 2008 13:42:56 -0800	[thread overview]
Message-ID: <20081104134256.24db6b36.akpm@linux-foundation.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0811041513490.23418@quilx.com>

On Tue, 4 Nov 2008 15:20:56 -0600 (CST)
Christoph Lameter <cl@linux-foundation.org> wrote:

> On Tue, 4 Nov 2008, Andrew Morton wrote:
> 
> >> +#ifdef CONFIG_CPUSETS
> >> +#if MAX_NUMNODES <= BITS_PER_LONG
> >> +	nodemask_t		dirty_nodes;	/* nodes with dirty pages */
> >> +#else
> >> +	nodemask_t		*dirty_nodes;	/* pointer to mask, if dirty */
> >> +#endif
> >> +#endif
> >>  } __attribute__((aligned(sizeof(long))));
> >
> > eek.  Increasing the size of the address_space (and hence of the inode)
> > is a moderately big deal - there can be millions of these in memory.
> 
> Well this is adding only a single word to the inode structure.

multiplied by millions.

> >> @@ -72,6 +72,8 @@ struct writeback_control {
> >>  	 * so we use a single control to update them
> >>  	 */
> >>  	unsigned no_nrwrite_index_update:1;
> >> +
> >> +	nodemask_t *nodes;		/* Nodemask to writeback */
> >
> > This one doesn't get ifdefs?
> 
> The structure is typically allocated temporarily on the stack.

An ifdef also helps catch the presence of unnecesary code.

> >> +	nodemask_t *nodes = mapping->dirty_nodes;
> >> +	int node = page_to_nid(page);
> >> +
> >> +	if (!nodes) {
> >> +		nodes = kmalloc(sizeof(nodemask_t), GFP_ATOMIC);
> >
> > erk, OK, called from __set_page_dirty, needs to be atomic.
> >
> > What are the consequences when this allocation fails?
> 
> Dirty tracking will not occur. All nodes are assumed to be dirty.

It won't oops?

> We discussed this earlier 
> http://www.ussg.iu.edu/hypermail/linux/kernel/0709.1/2291.html

Well, if it isn't in the changelog and isn't in code comments, we get
to discuss it again.

A great amount of mailing list discussion is a Huge Honking Big Fat
Hint that the original code was insufficently understandable.

  reply	other threads:[~2008-11-04 21:43 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-30 19:23 [patch 0/7] cpuset writeback throttling David Rientjes
2008-10-30 19:23 ` [patch 1/7] cpusets: add dirty map to struct address_space David Rientjes
2008-11-04 21:09   ` Andrew Morton
2008-11-04 21:20     ` Christoph Lameter
2008-11-04 21:42       ` Andrew Morton [this message]
2008-10-30 19:23 ` [patch 2/7] pdflush: allow the passing of a nodemask parameter David Rientjes
2008-10-30 19:23 ` [patch 3/7] mm: make page writeback obey cpuset constraints David Rientjes
2008-10-30 19:23 ` [patch 4/7] mm: cpuset aware reclaim writeout David Rientjes
2008-10-30 19:23 ` [patch 5/7] mm: throttle writeout with cpuset awareness David Rientjes
2008-10-30 19:23 ` [patch 6/7] cpusets: per cpuset dirty ratios David Rientjes
2008-10-30 19:23 ` [patch 7/7] cpusets: update documentation for writeback throttling David Rientjes
2008-10-30 21:08 ` [patch 0/7] cpuset " Dave Chinner
2008-10-30 21:33   ` Christoph Lameter
2008-10-30 22:03     ` Dave Chinner
2008-10-31 13:47       ` Christoph Lameter
2008-10-31 16:36       ` David Rientjes
2008-11-04 20:47 ` Andrew Morton
2008-11-04 20:53   ` Peter Zijlstra
2008-11-04 20:58     ` Christoph Lameter
2008-11-04 21:10     ` David Rientjes
2008-11-04 21:16     ` Andrew Morton
2008-11-04 21:21       ` Peter Zijlstra
2008-11-04 21:50         ` Andrew Morton
2008-11-04 22:17           ` Christoph Lameter
2008-11-04 22:35             ` Andrew Morton
2008-11-04 22:52               ` Christoph Lameter
2008-11-04 23:36                 ` Andrew Morton
2008-11-05  1:31                   ` KAMEZAWA Hiroyuki
2008-11-05  3:09                     ` Andrew Morton
2008-11-05  2:45                   ` Christoph Lameter
2008-11-05  3:05                     ` Andrew Morton
     [not found]                       ` <20081104190505.769b93ec.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2008-11-05  4:31                         ` KAMEZAWA Hiroyuki
2008-11-05  4:31                           ` KAMEZAWA Hiroyuki
2008-11-10  9:02                           ` Andrea Righi
     [not found]                             ` <4917F895.109-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2008-11-10 10:02                               ` David Rientjes
2008-11-10 10:02                                 ` David Rientjes
2008-11-05 13:52                       ` Christoph Lameter
2008-11-05 18:41                         ` Andrew Morton
2008-11-05 20:21                           ` Christoph Lameter
     [not found]                             ` <Pine.LNX.4.64.0811051415360.31450-dRBSpnHQED8AvxtiuMwx3w@public.gmane.org>
2008-11-05 20:31                               ` Andrew Morton
2008-11-05 20:31                                 ` Andrew Morton
2008-11-05 20:40                                 ` Christoph Lameter
2008-11-05 20:56                                   ` Andrew Morton
2008-11-05 21:28                                     ` Christoph Lameter
2008-11-05 21:55                                     ` Paul Menage
2008-11-05 22:04                                     ` David Rientjes
2008-11-06  1:34                                       ` KAMEZAWA Hiroyuki
2008-11-06 20:35                                         ` David Rientjes
  -- strict thread matches above, loose matches on Subject: below --
2008-10-28 16:08 [patch 1/7] cpusets: add dirty map to struct address_space David Rientjes
2008-10-28 17:37 ` Peter Zijlstra
2008-10-28 20:48   ` David Rientjes
2008-10-29  1:13     ` David Rientjes
2008-10-29  2:24       ` David Rientjes
2008-10-30  8:38       ` Peter Zijlstra
2008-10-28 17:46 ` Peter Zijlstra
2008-10-28 19:19   ` David Rientjes

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=20081104134256.24db6b36.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=cl@linux-foundation.org \
    --cc=dfults@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=menage@google.com \
    --cc=npiggin@suse.de \
    --cc=peterz@infradead.org \
    --cc=rientjes@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.