Re: Why does salinfo_log_read_cpu use kmalloc?

From: Keith Owens <>
Date: 2003-10-09 13:13:50
On Wed, 8 Oct 2003 09:55:44 -0600, 
Bjorn Helgaas <> wrote:
>On Wednesday 08 October 2003 1:08 am, Keith Owens wrote:
>> Why does arch/ia64/kernel/salinfo.c::salinfo_log_read_cpu() use
>> kmalloc() for the log buffer?  The code is running virtual with
>> interrupts enabled, SAL_GET_STATE_INFO has no special requirements for
>> the buffer attributes, so why not use vmalloc()?
>It's usually called via smp_call_function_single(), which uses
>an IPI to make it happen on another processor.  I thought
>this meant the function got called with interrupts disabled,
>but I could be wrong.

So the question becomes, why use smp_call_function_single() and have
the code run disabled?  salinfo_log_read_cpu() is performing work on
behalf of a user process, we can use set_cpus_allowed() and let the
scheduler run the code on the required cpu with interrupts enabled.

Any objections if I do a patch to replace smp_call_function_single()
with set_cpus_allowed(), so reading the records from SAL does not block
OS interrupts?  For the special case when the task is on the cpu that
salinfo wants to read from, the existing code does not use IPI so it
calls SAL with interrupts enabled.

To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to
More majordomo info at
Received on Wed Oct 8 23:14:39 2003

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:19 EST