From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Torvalds Subject: Re: [PATCH 1/11] Add generic helpers for arch IPI function calls Date: Tue, 22 Apr 2008 07:58:47 -0700 (PDT) Message-ID: References: <1208851058-8500-1-git-send-email-jens.axboe@oracle.com> <1208851058-8500-2-git-send-email-jens.axboe@oracle.com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Return-path: In-Reply-To: Sender: linux-arch-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: To: Jens Axboe Cc: linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, npiggin-l3A5Bk7waGM@public.gmane.org On Tue, 22 Apr 2008, Linus Torvalds wrote: > > You forgot to free the "data" here? The waiter must also free the object, > since now the callee does not. Ahh. For the single case, the caller will have it on the stack. But the smp_call_function_mask() case seems to leak these things. How about just always doing the "wait" case on the stack? Also, I'd suggest you get rid of the static allocation, and just turn it into a wait case, so that you don't need *three* different allocation cases, just two. Or am I missing something? Linus From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.linux-foundation.org ([140.211.169.13]:58293 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751462AbYDVPAA (ORCPT ); Tue, 22 Apr 2008 11:00:00 -0400 Date: Tue, 22 Apr 2008 07:58:47 -0700 (PDT) From: Linus Torvalds Subject: Re: [PATCH 1/11] Add generic helpers for arch IPI function calls In-Reply-To: Message-ID: References: <1208851058-8500-1-git-send-email-jens.axboe@oracle.com> <1208851058-8500-2-git-send-email-jens.axboe@oracle.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-arch-owner@vger.kernel.org List-ID: To: Jens Axboe Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, npiggin@suse.de Message-ID: <20080422145847.oBJGoInWR6JhP1Rd17RuP97-vIY-WS-o1bBxMQ0c7s0@z> On Tue, 22 Apr 2008, Linus Torvalds wrote: > > You forgot to free the "data" here? The waiter must also free the object, > since now the callee does not. Ahh. For the single case, the caller will have it on the stack. But the smp_call_function_mask() case seems to leak these things. How about just always doing the "wait" case on the stack? Also, I'd suggest you get rid of the static allocation, and just turn it into a wait case, so that you don't need *three* different allocation cases, just two. Or am I missing something? Linus