From owner-freebsd-mips@FreeBSD.ORG Sat Jul 17 19:35:49 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 AD84E1065677; Sat, 17 Jul 2010 19:35:49 +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 121FD8FC1C; Sat, 17 Jul 2010 19:35:44 +0000 (UTC) Received: by fxm13 with SMTP id 13so1785330fxm.13 for ; Sat, 17 Jul 2010 12:35:44 -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=4qI01sPq9nxyVfBLb9j2LlAOvtPR84ZCAMiIC/q57cs=; b=AFy4+MujYfquAgBPicV3gTaoLEh+zj9sfrWOQEodsrFKj/r4BSDZ6N7n+5VUA9iFMp pSGUNECedc21BeeDbvCbraMEnZr+FGKxTtwDa5mSXkziUfGOVTxkl9eOYa9odH2tKoXR hhy+qjk20dSPXabTZKHH2awummix1YzxcLVgo= 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=qdDYOI7/YrXXP2BMn0dNGo3h02fdUnH9oMACMblHOyjHIW+oC/EoVNGYzUU1nY4nu2 WRHgqK3DBrDCm+G7uVWoF9+Oj/93waNqg+8uOtaAXhCq1XTt77Kelw0vByX7I8HpQ46z NoEXw4k01Te0XoyLhq739/Ij05g5L0PR93Ovg= Received: by 10.223.111.200 with SMTP id t8mr1919308fap.31.1279395343801; Sat, 17 Jul 2010 12:35:43 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id h8sm1288701faj.14.2010.07.17.12.35.42 (version=SSLv3 cipher=RC4-MD5); Sat, 17 Jul 2010 12:35:43 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C4205CC.6080700@FreeBSD.org> Date: Sat, 17 Jul 2010 22:34:36 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: "Jayachandran C." References: <4C41A248.8090605@FreeBSD.org> <4C41B4CF.6080409@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Neel Natu , 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 19:35:49 -0000 Jayachandran C. wrote: > On XLR we would like to use the count/compare which is faster but less > accurate on all cpus - we can have upto 32 cpus now. We also have a > PIC which can provide a better timestamp and timer interrupts. This > PIC timestamp can be read from all CPUs but the timer interrupt can be > delivered to just one CPU at a time. I think this is how we ended up > with the current implementation, but any suggestions on how to improve > this is welcome. I would prefer to not mix the things. I think: - PIC timestamp looks like the best candidate for system timecounter. - per-CPU counters could be registered as per-CPU timecounters with set_cputicker() - the main criteria there is a speed. - if per-CPU counters are synchronized between CPUs - they could be registered as alternative timecounter for people who wish fastest timecounting; if they are not - they are useless in that role. - both PIC timer and per-CPU comparators should be independently registered as eventtimers - it is better to have two of them to from accounting correctness PoV, and it will allow user to experiment which one he likes more. - if there is any other timer hardware - it also should be registered - it will give additional flexibility. PS: I've managed to run MALTA kernel with patch under gxemul. It works, except time is not going right. But I suppose it is emulator problem, as original kernel works the same. -- Alexander Motin