public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Bob Picco <bob.picco@hp.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [Lhms-devel] [PATCH 4/4] V4 ia64 SPARSEMEM - SPARSEMEM code changes
Date: Thu, 22 Sep 2005 17:59:38 +0000	[thread overview]
Message-ID: <20050922175938.GC16066@localhost.localdomain> (raw)
In-Reply-To: <1127406976.10664.52.camel@localhost>

Dave Hansen wrote:	[Thu Sep 22 2005, 12:36:16PM EDT]
> On Thu, 2005-09-22 at 12:14 -0400, Bob Picco wrote:
> > This patch is the minimal set of changes required by ia64 to use
> > SPARSEMEM.
> 
> I have a couple of little style comments.
> 
> > +#ifdef CONFIG_SPARSEMEM
> > +	efi_memmap_walk(register_sparse_mem, NULL);
> > +#endif
> > +	sparse_init();
> > +
> >  	efi_memmap_walk(filter_rsvd_memory, count_node_pages);
> >  
> > +#ifdef CONFIG_VIRTUAL_MEM_MAP
> >  	vmalloc_end -= PAGE_ALIGN(max_low_pfn * sizeof(struct page));
> >  	vmem_map = (struct page *) vmalloc_end;
> >  	efi_memmap_walk(create_mem_map_page_table, NULL);
> >  	printk("Virtual mem_map starts at 0x%p\n", vmem_map);
> > +#endif
> 
> It would be nice if these kind of .c file #ifdefs could be broken out a
> little more.  For instance, you could make an arch_sparse_init() that
> does all of the sparsemem bits, and make it a do{}while(0) when !
> CONFIG_SPARSEMEM.
I could do this.  It would eliminate one conditional.  Eventually I'm hope
for only SPARSEMEM but that is a ways off.
> 
> >  	for_each_online_node(node) {
> >  		memset(zones_size, 0, sizeof(zones_size));
> > @@ -690,7 +722,9 @@ void __init paging_init(void)
> >  
> >  		pfn_offset = mem_data[node].min_pfn;
> >  
> > +#ifdef CONFIG_VIRTUAL_MEM_MAP
> >  		NODE_DATA(node)->node_mem_map = vmem_map + pfn_offset;
> > +#endif
> 
> Is CONFIG_FLAT_NODE_MEM_MAP more appropriate here?  That's how
> ->node_mem_map is #ifdef'd to begin with in mmzone.h.
Well I think this is doable but probaably shouldn't. This code is very
specific to CONFIG_VIRTUAL_MEM_MAP.
> 
> > --- linux-2.6.14-rc2.orig/arch/ia64/mm/numa.c	2005-09-21 12:28:49.000000000 -0400
> > +++ linux-2.6.14-rc2/arch/ia64/mm/numa.c	2005-09-21 12:29:05.000000000 -0400
> > @@ -45,5 +45,30 @@ paddr_to_nid(unsigned long paddr)
> >  		    paddr < node_memblk[i].start_paddr + node_memblk[i].size)
> >  			break;
> >  
> > -	return (i < num_node_memblks) ? node_memblk[i].nid : (num_node_memblks ? -1 : 0);
> > +	return (i < num_node_memblks) ?
> > +		node_memblk[i].nid : (num_node_memblks ? -1 : 0);
> >  }
> 
> Looks like just a whitespace change.
Oh dam. This shouldn't have been introduced.  It's not part of SPARSEMEM.
> 
> -- Dave
bob
> 

  parent reply	other threads:[~2005-09-22 17:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-22 16:36 [Lhms-devel] [PATCH 4/4] V4 ia64 SPARSEMEM - SPARSEMEM code Dave Hansen
2005-09-22 17:13 ` [Lhms-devel] [PATCH 4/4] V4 ia64 SPARSEMEM - SPARSEMEM code changes Matthew Wilcox
2005-09-22 17:59 ` Bob Picco [this message]
2005-09-22 18:01 ` Bob Picco
2005-09-22 18:05 ` [Lhms-devel] [PATCH 4/4] V4 ia64 SPARSEMEM - SPARSEMEM code Dave Hansen
2005-09-22 18:47 ` [Lhms-devel] [PATCH 4/4] V4 ia64 SPARSEMEM - SPARSEMEM code changes Bob Picco

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=20050922175938.GC16066@localhost.localdomain \
    --to=bob.picco@hp.com \
    --cc=linux-ia64@vger.kernel.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