From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Cox Subject: Re: What if a TLB flush needed to sleep? Date: Tue, 25 Mar 2008 21:47:25 +0000 Message-ID: <20080325214725.3d707445@core> References: <1FE6DD409037234FAB833C420AA843ECE9DF60@orsmsx424.amr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1FE6DD409037234FAB833C420AA843ECE9DF60-7XlYjKTK0pM64kNsxIetb7fspsVTdybXVpNB7YpNyf8@public.gmane.org> Sender: linux-arch-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: To: "Luck, Tony" Cc: linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > down(&ptcg_sem); > ... execute ptc.g > up(&ptcg_sem); That will dig you a nice large hole for real time to fall into. If you want to do rt nicely you want to avoid semaphores and the corresponding lack of ability to fix priority inversions. > 2) Is it feasible to rearrange the MM code so that we don't > hold any locks while doing a TLB flush? Or should I implement > some sort of spin_only_semaphore? Better to keep ia64 perversions in the IA64 code whenever possible and lower risk for everyone else. Alan From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from outpipe-village-512-1.bc.nu ([81.2.110.250]:46795 "EHLO lxorguk.ukuu.org.uk" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1757760AbYCYWD4 (ORCPT ); Tue, 25 Mar 2008 18:03:56 -0400 Date: Tue, 25 Mar 2008 21:47:25 +0000 From: Alan Cox Subject: Re: What if a TLB flush needed to sleep? Message-ID: <20080325214725.3d707445@core> In-Reply-To: <1FE6DD409037234FAB833C420AA843ECE9DF60@orsmsx424.amr.corp.intel.com> References: <1FE6DD409037234FAB833C420AA843ECE9DF60@orsmsx424.amr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-arch-owner@vger.kernel.org List-ID: To: "Luck, Tony" Cc: linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Message-ID: <20080325214725.5XOFXopb_sKi3Nwn5Akk5sjeVgnNzw-faKuQm3uygMU@z> > down(&ptcg_sem); > ... execute ptc.g > up(&ptcg_sem); That will dig you a nice large hole for real time to fall into. If you want to do rt nicely you want to avoid semaphores and the corresponding lack of ability to fix priority inversions. > 2) Is it feasible to rearrange the MM code so that we don't > hold any locks while doing a TLB flush? Or should I implement > some sort of spin_only_semaphore? Better to keep ia64 perversions in the IA64 code whenever possible and lower risk for everyone else. Alan From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761520AbYCYWEa (ORCPT ); Tue, 25 Mar 2008 18:04:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758678AbYCYWD5 (ORCPT ); Tue, 25 Mar 2008 18:03:57 -0400 Received: from outpipe-village-512-1.bc.nu ([81.2.110.250]:46795 "EHLO lxorguk.ukuu.org.uk" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1757760AbYCYWD4 (ORCPT ); Tue, 25 Mar 2008 18:03:56 -0400 Date: Tue, 25 Mar 2008 21:47:25 +0000 From: Alan Cox To: "Luck, Tony" Cc: , , Subject: Re: What if a TLB flush needed to sleep? Message-ID: <20080325214725.3d707445@core> In-Reply-To: <1FE6DD409037234FAB833C420AA843ECE9DF60@orsmsx424.amr.corp.intel.com> References: <1FE6DD409037234FAB833C420AA843ECE9DF60@orsmsx424.amr.corp.intel.com> X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.5; x86_64-redhat-linux-gnu) Organization: Red Hat UK Cyf., Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, Y Deyrnas Gyfunol. Cofrestrwyd yng Nghymru a Lloegr o'r rhif cofrestru 3798903 Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > down(&ptcg_sem); > ... execute ptc.g > up(&ptcg_sem); That will dig you a nice large hole for real time to fall into. If you want to do rt nicely you want to avoid semaphores and the corresponding lack of ability to fix priority inversions. > 2) Is it feasible to rearrange the MM code so that we don't > hold any locks while doing a TLB flush? Or should I implement > some sort of spin_only_semaphore? Better to keep ia64 perversions in the IA64 code whenever possible and lower risk for everyone else. Alan From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Tue, 25 Mar 2008 21:47:25 +0000 From: Alan Cox Subject: Re: What if a TLB flush needed to sleep? Message-ID: <20080325214725.3d707445@core> In-Reply-To: <1FE6DD409037234FAB833C420AA843ECE9DF60@orsmsx424.amr.corp.intel.com> References: <1FE6DD409037234FAB833C420AA843ECE9DF60@orsmsx424.amr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org Return-Path: To: "Luck, Tony" Cc: linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org List-ID: > down(&ptcg_sem); > ... execute ptc.g > up(&ptcg_sem); That will dig you a nice large hole for real time to fall into. If you want to do rt nicely you want to avoid semaphores and the corresponding lack of ability to fix priority inversions. > 2) Is it feasible to rearrange the MM code so that we don't > hold any locks while doing a TLB flush? Or should I implement > some sort of spin_only_semaphore? Better to keep ia64 perversions in the IA64 code whenever possible and lower risk for everyone else. Alan -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org