mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Martin J. Bligh" <mbligh@aracnet.com>
To: gone@us.ibm.com, linux-kernel@vger.kernel.org
Cc: chandra.sekharan@us.ibm.com, cleverdj@us.ibm.com, johnstul@us.ibm.com
Subject: Re: [PATCH][RFC] Discontigmem support for the x440
Date: Sat, 08 Feb 2003 11:23:24 -0800	[thread overview]
Message-ID: <15810000.1044732203@[10.10.2.4]> (raw)
In-Reply-To: <200302060710.h167Alf02508@w-gaughen.beaverton.ibm.com>

> +/* Identify which cnode a physical address resides on */
> +int pfn_to_nid(unsigned long pfn)
> +{
> +	int	i;
> +	struct node_memory_chunk_s *nmcp;
> +
> +	/* We've got a sorted list.  Binary search here?  Do we care?? */
> +	nmcp = node_memory_chunk;
> +	for (i = num_memory_chunks; --i >= 0; nmcp++)
> +		if (pfn >= nmcp->start_pfn && pfn <= nmcp->end_pfn)
> +			return (int)nmcp->nid;
> +
> +	return -1;
> +}

This is called a lot, and it's large and inefficient. Can you turn it 
into an array lookup like the NUMA-Q implementation, and inline it? 

All the clumps and chunks stuff can go, I think.

> diff -Nru a/drivers/acpi/events/evevent.c b/drivers/acpi/events/evevent.c
> --- a/drivers/acpi/events/evevent.c	Wed Feb  5 19:15:58 2003
> +++ b/drivers/acpi/events/evevent.c	Wed Feb  5 19:15:58 2003
> @@ -104,6 +104,7 @@
>  
>  	ACPI_FUNCTION_TRACE ("ev_handler_initialize");
>  
> +	return_ACPI_STATUS (0);
>  
>  	/* Install the SCI handler */

That used to be wrapped in ifdef CONFIG_SUMMIT, which seems much safer
to me ... any reason for the change?

And all the kludge stuff needs to go, but you know that already ;-)

M.


  reply	other threads:[~2003-02-08 19:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-06  7:10 Patricia Gaughen
2003-02-08 19:23 ` Martin J. Bligh [this message]
2003-02-06 20:16 Grover, Andrew
2003-02-18 22:39 Andy Whitcroft
2003-02-18 22:55 ` Patricia Gaughen

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='15810000.1044732203@[10.10.2.4]' \
    --to=mbligh@aracnet.com \
    --cc=chandra.sekharan@us.ibm.com \
    --cc=cleverdj@us.ibm.com \
    --cc=gone@us.ibm.com \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®