From owner-svn-src-head@FreeBSD.ORG Wed Jul 14 19:19:46 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 002C1106567E; Wed, 14 Jul 2010 19:19:45 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id E1A5D8FC12; Wed, 14 Jul 2010 19:19:44 +0000 (UTC) Received: by bwz12 with SMTP id 12so188520bwz.13 for ; Wed, 14 Jul 2010 12:19:43 -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=erO1tHSp6Ic2ffVIoKUxEebJCUKk+xgwcfjpMqWFNj0=; b=tUFCJC5W8bRj+wqTFgUdqMbAkn1ACoqqG/CH34wEOybeG7eAmxaE4IrgZ0IgOHvCTf pgKeiTY0pg5Z270ofsOHvQeArddVttnuZttTznOYul2+MrPLHZZUAIV9W0bwEau1oc9b cvFBfw2rD1m31oVvugJw5b/qvTUPmbHGSjy98= 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=GE7LyLdwn/EAEiEAiPWCrrTgjWZFayr4Sip7yqUY12Z7LfiP3KJ0xTEuqyN+YoNPwu IJVlqDwJQhD+DbIU2DGeC3X8heWGYP+SkD9ZbPo7vBPDWRyHskVCbOd1yL4l8sD002qm PIhMdqMbnFQ/TdnEd+6qGmA7ybeoCsiNrUUDg= Received: by 10.204.19.83 with SMTP id z19mr13745882bka.43.1279135183398; Wed, 14 Jul 2010 12:19:43 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id f10sm1275847bkl.17.2010.07.14.12.19.42 (version=SSLv3 cipher=RC4-MD5); Wed, 14 Jul 2010 12:19:42 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C3E0D93.1000009@FreeBSD.org> Date: Wed, 14 Jul 2010 22:18:43 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: John Baldwin References: <201007141331.o6EDVRp2078644@svn.freebsd.org> <201007141420.05688.jhb@freebsd.org> <4C3E0384.9090903@FreeBSD.org> <201007141451.07452.jhb@freebsd.org> In-Reply-To: <201007141451.07452.jhb@freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210054 - in head/sys: conf kern x86/x86 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 19:19:46 -0000 John Baldwin wrote: > On Wednesday, July 14, 2010 2:35:48 pm Alexander Motin wrote: >> John Baldwin wrote: >>> On Wednesday, July 14, 2010 1:01:14 pm Alexander Motin wrote: >>>> John Baldwin wrote: >>>>> On Wednesday, July 14, 2010 11:59:46 am Alexander Motin wrote: >>>>>> John Baldwin wrote: >>>>>>> On Wednesday, July 14, 2010 9:31:27 am Alexander Motin wrote: >>>>>>>> Author: mav >>>>>>>> Date: Wed Jul 14 13:31:27 2010 >>>>>>>> New Revision: 210054 >>>>>>>> URL: http://svn.freebsd.org/changeset/base/210054 >>>>>>>> >>>>>>>> Log: >>>>>>>> Move timeevents.c to MI code, as it is not x86-specific. I already have >>>>>>>> it working on Marvell ARM SoCs, and it would be nice to unify timer >>>>> code >>>>>>>> between more platforms. >>>>>>>> >>>>>>>> Added: >>>>>>>> head/sys/kern/timeevents.c >>>>>>>> - copied unchanged from r210053, head/sys/x86/x86/timeevents.c >>>>>>>> Deleted: >>>>>>>> head/sys/x86/x86/timeevents.c >>>>>>>> Modified: >>>>>>>> head/sys/conf/files.amd64 >>>>>>>> head/sys/conf/files.i386 >>>>>>>> head/sys/conf/files.pc98 >>>>>>> Can this be merged with kern_et.c, >>>>>> They are different. kern_et.c provides event timer drivers API, >>>>>> timeevents.c consumes it to manage kernel clocks. kern_et.c >>>>>> theoretically can be used without timeevents.c if some other code >>>>>> consume timers, for example, exposing them to user-level. >>>>>> >>>>>> May be names indeed cryptic a bit, but I had no better ideas. >>>>>> >>>>>>> or perhaps called subr_eventtimers.c instead? >>>>>> Whatever you like, but why exactly so and why "subr_" important? >>>>> The vast majority of files in sys/kern use some sort of prefix, either sys_*, >>>>> kern_*, subr_*, etc. subr_ was just a suggestion to avoid clashing with >>>>> kern_et.c. If timeevents.c is specific to clocks then maybe it should have >>>>> 'clock' in its name somehow? Right now having kern_et == kern_eventtimer.c >>>>> and timeevents.c is a bit ambiguous. Somehow making it clear that >>>>> timeevents.c is for clocks might help. >>>> We already have kern_clock.c and subr_clock.c. kern_clock.c is quite >>>> close by meaning. What's about kern_clocksource.c? >>> Ok. I assume it would not be easy to just merge this file into kern_clock.c >>> itself? >> At least not until all architectures will adapt to it. > > Do you think that is the long term goal? I think not, but timer code for the many arches need to be refactored, all of them are different and some I've never seen. > If so, you could put this code into > kern_clock.c and selectively enable it with a macro defined in > as a temporary measure until all platforms have adopted it. That's possible, but I am not sure it is reasonable. -- Alexander Motin