Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752157AbbBWX1n (ORCPT ); Mon, 23 Feb 2015 18:27:43 -0500 Received: from mail-bn1bon0137.outbound.protection.outlook.com ([157.56.111.137]:8659 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751676AbbBWX1m (ORCPT ); Mon, 23 Feb 2015 18:27:42 -0500 Message-ID: <1424734051.4698.17.camel@freescale.com> Subject: Re: [PATCH 0/2] powerpc/kvm: Enable running guests on RT Linux From: Scott Wood To: Sebastian Andrzej Siewior CC: Paolo Bonzini , Alexander Graf , Bogdan Purcareata , , , , , "Thomas Gleixner" Date: Mon, 23 Feb 2015 17:27:31 -0600 In-Reply-To: <54E74A8C.30802@linutronix.de> References: <1424251955-308-1-git-send-email-bogdan.purcareata@freescale.com> <54E73A6C.9080500@suse.de> <54E740E7.5090806@redhat.com> <54E74A8C.30802@linutronix.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.7-0ubuntu1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Originating-IP: [2601:2:5800:3f7:12bf:48ff:fe84:c9a0] X-ClientProxiedBy: BY1PR00CA0013.namprd00.prod.outlook.com (25.160.102.23) To DM2PR0301MB0734.namprd03.prod.outlook.com (25.160.97.142) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=scottwood@freescale.com; X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB0734; X-Bulk-Sender: Mark as legitimate X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005003);SRVR:DM2PR0301MB0734; X-Forefront-PRVS: 0496DF6962 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(979002)(6009001)(479174004)(24454002)(199003)(51704005)(377424004)(377454003)(189002)(77156002)(33646002)(76176999)(36756003)(110136001)(50986999)(87976001)(46102003)(50226001)(62966003)(42186005)(101416001)(106356001)(50466002)(64706001)(47776003)(93886004)(103116003)(92566002)(575784001)(86362001)(105586002)(5820100001)(122386002)(2950100001)(97736003)(40100003)(23676002)(68736005)(99106002)(3826002)(969003)(989001)(999001)(1009001)(1019001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM2PR0301MB0734;H:[IPv6:2601:2:5800:3f7:12bf:48ff:fe84:c9a0];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB0734; X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Feb 2015 23:27:38.8472 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0301MB0734 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2002 Lines: 43 On Fri, 2015-02-20 at 15:54 +0100, Sebastian Andrzej Siewior wrote: > On 02/20/2015 03:12 PM, Paolo Bonzini wrote: > >> Thomas, what is the usual approach for patches like this? Do you take > >> them into your rt tree or should they get integrated to upstream? > > > > Patch 1 is definitely suitable for upstream, that's the reason why we > > have raw_spin_lock vs. raw_spin_unlock. > > raw_spin_lock were introduced in c2f21ce2e31286a0a32 ("locking: > Implement new raw_spinlock). They are used in context which runs with > IRQs off - especially on -RT. This includes usually interrupt > controllers and related core-code pieces. > > Usually you see "scheduling while atomic" on -RT and convert them to > raw locks if it is appropriate. > > Bogdan wrote in 2/2 that he needs to limit the number of CPUs in oder > not cause a DoS and large latencies in the host. I haven't seen an > answer to my why question. Because if the conversation leads to > large latencies in the host then it does not look right. > > Each host PIC has a rawlock and does mostly just mask/unmask and the > raw lock makes sure the value written is not mixed up due to > preemption. > This hardly increase latencies because the "locked" path is very short. > If this conversation leads to higher latencies then the locked path is > too long and hardly suitable to become a rawlock. This isn't a host PIC driver. It's guest PIC emulation, some of which is indeed not suitable for a rawlock (in particular, openpic_update_irq which loops on the number of vcpus, with a loop body that calls IRQ_check() which loops over all pending IRQs). The vcpu limits are a temporary bandaid to avoid the worst latencies, but I'm still skeptical about this being upstream material. -Scott -- 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/