Re: [PATCH][RFC] Discontigmem support for the x440

From: Martin J. Bligh (mbligh@aracnet.com)
Date: Sat Feb 08 2003 - 14:23:24 EST


> +/* 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.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Feb 15 2003 - 22:00:20 EST