Re: [patch] rt: fix ipi kfree(), introduce IPI_SOFTIRQ

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2009-02-12 at 09:19 +0100, Ingo Molnar wrote:
> * Ingo Molnar <mingo@xxxxxxx> wrote:
> 
> > hm, that's a complex one - we do kfree() from IPI context, [...]
> 
> The patch below might do the trick - it offloads this to a softirq.
> Not tested yet.

The simple fix is something like:

---
 kernel/smp.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/kernel/smp.c b/kernel/smp.c
index bbedbb7..9b974c1 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -252,7 +252,11 @@ int smp_call_function_single(int cpu, void (*func) (void *info), void *info,
 			 * will make sure the callee is done with the
 			 * data before a new caller will use it.
 			 */
+#ifndef CONFIG_PREEMPT_RT
 			data = kmalloc(sizeof(*data), GFP_ATOMIC);
+#else
+			data = NULL;
+#endif
 			if (data)
 				data->flags = CSD_FLAG_ALLOC;
 			else {
@@ -347,7 +351,11 @@ void smp_call_function_many(const struct cpumask *mask,
 		return;
 	}
 
+#ifndef CONFIG_PREEMPT_RT
 	data = kmalloc(sizeof(*data) + cpumask_size(), GFP_ATOMIC);
+#else
+	data = NULL;
+#endif
 	if (unlikely(!data)) {
 		/* Slow path. */
 		for_each_online_cpu(cpu) {

--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux