From owner-freebsd-mips@FreeBSD.ORG Sat Jul 17 17:34:10 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95680106566B; Sat, 17 Jul 2010 17:34:10 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id D75258FC16; Sat, 17 Jul 2010 17:34:09 +0000 (UTC) Received: by fxm13 with SMTP id 13so1758307fxm.13 for ; Sat, 17 Jul 2010 10:34:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=UW1lqRR7EjGsoetvAYL+fm8TbPcY8SScLFVaAqd+4p8=; b=OU8VjVunz0l3qshhW88DsaETR9F5YGfjMm5RLeOTnuT0mAwbCzg3TKyp1HPseKLfPM CLQFmyb8z/dlKDPsKp2YUfW87WAb7HZ/FPc/EaRE1CVCVy2JUPMANzI3BXrSx3lsUzYL CEh143CvWQhj4XwxPbOXJBlIpuufbwIVIOkUw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=B7c6Os6PZS+LaS2zKT9PmW9SO4WBuxZHAvuc6unAXH/2GRjULTaftNPdals7Ar7xUs uBWKGwHOWR6EBqdwYVcOVqjtpQEHuIbeV7uiJ7k3UXl8vPTWb+YudUGHRpwtocbLAlQy GpH5QxPkzgjchBt7rtywT/kgBjc8r2pnv7tHU= Received: by 10.223.107.137 with SMTP id b9mr1835331fap.17.1279388048551; Sat, 17 Jul 2010 10:34:08 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id b36sm1252051faq.35.2010.07.17.10.34.07 (version=SSLv3 cipher=RC4-MD5); Sat, 17 Jul 2010 10:34:07 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C41E94D.5030206@FreeBSD.org> Date: Sat, 17 Jul 2010 20:33:01 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: "M. Warner Losh" References: <4C41A248.8090605@FreeBSD.org> <20100717.112233.994790107173916507.imp@bsdimp.com> In-Reply-To: <20100717.112233.994790107173916507.imp@bsdimp.com> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: neel@FreeBSD.ORG, freebsd-mips@FreeBSD.ORG Subject: Re: [RFC] Event timers on MIPS X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jul 2010 17:34:10 -0000 M. Warner Losh wrote: > In message: <4C41A248.8090605@FreeBSD.org> > Alexander Motin writes: > : I've made a patch, updating MIPS timer code (except RMI) to utilize new > : MI event timer infrastructure. I've successfully built QEMU and XLR > : kernels with the patch. Unluckily I can't test how it works, unless > : somebody teach me how to cook QEMU to run it. I also haven't ported RMI > : timers drivers, as I am not sure how that hardware is intended to work. > : > : Patch for HEAD can be found here: > : http://people.freebsd.org/~mav/timers_mips.patch > > I'll have to take a look at things. On MIPS, the COMPARE register is > per core, so you don't need to send an IPI if you are using that > hardware. IPIs are a little expensive, IIRC, since they tend to have > bad cache effects and put extra pressure on the TLBs. > > It wasn't clear from these patches if you are using one core to do the > signalling for all the others or not. If so, that represents a bit of > a regression. I'm also not sure about not having a per-cpu timer's > effect on performance on a 16 or 32 core MIPS box... I am registering event timer as per-CPU: + sc->et.et_flags = ET_FLAGS_PERIODIC | ET_FLAGS_ONESHOT | + ET_FLAGS_PERCPU; Clock IPI's added only for completeness, in case there will be supported any other non-per-CPU timers, like mentioned PIC clock on XLR. Thanks. -- Alexander Motin