public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [Discontig-devel] [RFC/PATCH] discontig update for linux-ia64-2.5 bk tree
@ 2003-06-18 16:54 Martin J. Bligh
  2003-06-18 17:10 ` Jesse Barnes
  0 siblings, 1 reply; 2+ messages in thread
From: Martin J. Bligh @ 2003-06-18 16:54 UTC (permalink / raw)
  To: linux-ia64


You seem to have missed the comments here:

> -#ifndef CONFIG_DISCONTIGMEM          /* Don't use mapnrs, do it properly */
> extern unsigned long max_mapnr;
> -#endif
> ...
> -#ifndef CONFIG_DISCONTIGMEM
> /* The array of struct pages - for discontigmem use pgdat->lmem_map */
>  extern struct page *mem_map;
> -#endif 

Using global mapnrs for discontigmem is a horrible kludge, and very 
confusing. There was a damned good reason I removed those ...

It should be easy to just use local offsets into the node, right?

> diff -Nru a/mm/page_alloc.c b/mm/page_alloc.c
> --- a/mm/page_alloc.c	Tue Jun 17 14:45:16 2003
> +++ b/mm/page_alloc.c	Tue Jun 17 14:45:16 2003
> @@ -57,12 +57,15 @@
>   */
>  static int bad_range(struct zone *zone, struct page *page)
>  {
> -	if (page_to_pfn(page) >= zone->zone_start_pfn + zone->spanned_pages)
> +	if (page_to_pfn(page) >= zone->zone_start_pfn + zone->spanned_pages) {
>  		return 1;
> -	if (page_to_pfn(page) < zone->zone_start_pfn)
> +	}
> +	if (page_to_pfn(page) < zone->zone_start_pfn) {
>  		return 1;
> -	if (zone != page_zone(page))
> +	}
> +	if (zone != page_zone(page)) {
>  		return 1;
> +	}
>  	return 0;
>  }

Why? this just looks like removing standard Linux style? 
Is there a real change hidden in there?

M.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Discontig-devel] [RFC/PATCH] discontig update for linux-ia64-2.5 bk tree
  2003-06-18 16:54 [Discontig-devel] [RFC/PATCH] discontig update for linux-ia64-2.5 bk tree Martin J. Bligh
@ 2003-06-18 17:10 ` Jesse Barnes
  0 siblings, 0 replies; 2+ messages in thread
From: Jesse Barnes @ 2003-06-18 17:10 UTC (permalink / raw)
  To: linux-ia64

On Wed, Jun 18, 2003 at 09:54:40AM -0700, Martin J. Bligh wrote:
> 
> You seem to have missed the comments here:
> 
> > -#ifndef CONFIG_DISCONTIGMEM          /* Don't use mapnrs, do it properly */
> > extern unsigned long max_mapnr;
> > -#endif
> > ...
> > -#ifndef CONFIG_DISCONTIGMEM
> > /* The array of struct pages - for discontigmem use pgdat->lmem_map */
> >  extern struct page *mem_map;
> > -#endif 
> 
> Using global mapnrs for discontigmem is a horrible kludge, and very 
> confusing. There was a damned good reason I removed those ...
> 
> It should be easy to just use local offsets into the node, right?

I'll look at this.

> > diff -Nru a/mm/page_alloc.c b/mm/page_alloc.c
> > --- a/mm/page_alloc.c	Tue Jun 17 14:45:16 2003
> > +++ b/mm/page_alloc.c	Tue Jun 17 14:45:16 2003
> > @@ -57,12 +57,15 @@
> >   */
> >  static int bad_range(struct zone *zone, struct page *page)
> >  {
> > -	if (page_to_pfn(page) >= zone->zone_start_pfn + zone->spanned_pages)
> > +	if (page_to_pfn(page) >= zone->zone_start_pfn + zone->spanned_pages) {
> >  		return 1;
> > -	if (page_to_pfn(page) < zone->zone_start_pfn)
> > +	}
> > +	if (page_to_pfn(page) < zone->zone_start_pfn) {
> >  		return 1;
> > -	if (zone != page_zone(page))
> > +	}
> > +	if (zone != page_zone(page)) {
> >  		return 1;
> > +	}
> >  	return 0;
> >  }
> 
> Why? this just looks like removing standard Linux style? 
> Is there a real change hidden in there?

Oops, that one stuck past me.

Thanks,
Jesse

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-06-18 17:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-18 16:54 [Discontig-devel] [RFC/PATCH] discontig update for linux-ia64-2.5 bk tree Martin J. Bligh
2003-06-18 17:10 ` Jesse Barnes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox