From owner-svn-src-head@freebsd.org Fri Sep 6 14:18:41 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BF217F4D3B for ; Fri, 6 Sep 2019 14:18:41 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound3d.ore.mailhop.org (outbound3d.ore.mailhop.org [54.186.57.195]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46Q0692f50z4Pw1 for ; Fri, 6 Sep 2019 14:18:41 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1567779520; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=YCuws3SmoEQ4zjZuakAyvt5PYOywBa2A2OHkwTyO+V4N507L6ckn7/D88vm5Oc3At6qSvCAYOixbN DpRVCD5s8QhvaLHhmElSeJvNTEUR/mDoKFbEJNOHSxCHYCr6NwVHO6UdQBp+ufD5RPOHyZLX0NeLoL iFBQE8iZy887Q1fo5DCA2j1wt1mEFJasIMSeJloiv+KJA6Ev5fiOd0e3y5pzuYR3XHyvypVp1bSv9Q ib3JVO+HI6bdBEP7zUkBm/dOYkE8XK4ujvzl1sBsKVfM7xIsVN+WbQitU7Ik3meORyChLdF83Hw9w2 BxvBlFdmuJU7jD8GwTnT7+PQqyp6OhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=w6bFtMLLro62RNwJfkN69t8gxJaJUdK+smczYlK1Odo=; b=f9r/vI/qZwh8X9C2KfDWF6HRdmY198bZA4wEqZ9zZSeAPgIilPwQ6UzvapV9TFAyXo91VpSMDK6Ng c6kI9Br4rXW99SXkXZsG/WgtzVqqBg+wrJD3/wLkU6joIkCvUQwVXyYXUAvHhAsjkopwpaPrasK/CT x6WCmWmjSxNsAuQau0kaFrtPiWHgNagET12q6JnL1EYFa546pVc4bZjUlCaTTUV3bRUZD4dySKCdPh t54BGRPedWenSfDJ98bpDiDA5eKR3bNDND4xM1jzuAd6fEFmK+8KtpLTPewQEmsrXIwY9/wTvbB/f4 pxjBM3CTeZBU74t+Iv0TEoaTtKV18QQ== ARC-Authentication-Results: i=1; outbound3.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=w6bFtMLLro62RNwJfkN69t8gxJaJUdK+smczYlK1Odo=; b=WT/pL/z5UWmA6NucBjZzucIduCSEBIgiC4TCvnwCTIuPLBd/t5kiqstsPhFCBeta6Vp/KmEExcUyC rAB3vLL2l/SMN0+LTrconaXZ8ueCmNyavx7f1hTuKbzgFEhork2ybngy6TRfkaTYCUQTsnFmrAsL6H sapCrs4NEnWxeblN/PONaFCc/FUMMvGSwqr00vll8L2dlr1qP6J/ATWFL/JvJUpQOKUXaZSWpb0maQ s4Ti98WRUrrUleFQflkaNAPc5WBNnkXukhIq9OWm8mFP+JoNBL1paJE/wMcAgCAxCuf/dAnvTwMWFc PF1VC9x94+os0izbPxy0qUA/VoKfFUQ== X-MHO-RoutePath: aGlwcGll X-MHO-User: 376ea319-d0b1-11e9-b67c-cdd75d6ce7a8 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound3.ore.mailhop.org (Halon) with ESMTPSA id 376ea319-d0b1-11e9-b67c-cdd75d6ce7a8; Fri, 06 Sep 2019 14:18:38 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x86EIaPw050497; Fri, 6 Sep 2019 08:18:36 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <3cb6429acc7e520932d2c906d1cac47540156355.camel@freebsd.org> Subject: Re: svn commit: r351918 - head/sys/kern From: Ian Lepore To: Philip Paeps Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Fri, 06 Sep 2019 08:18:36 -0600 In-Reply-To: <5EE266EE-E650-48D8-9B0E-E674AD026470@freebsd.org> References: <201909060119.x861JWrG006910@repo.freebsd.org> <4917d7507b6ea6c360dccda261f53052aa085f2b.camel@freebsd.org> <5EE266EE-E650-48D8-9B0E-E674AD026470@freebsd.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 46Q0692f50z4Pw1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.982,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:16509, ipnet:54.186.0.0/15, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 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: Fri, 06 Sep 2019 14:18:41 -0000 On Fri, 2019-09-06 at 12:15 +0800, Philip Paeps wrote: > On 2019-09-06 11:15:12 (+0800), Ian Lepore wrote: > > On Fri, 2019-09-06 at 01:19 +0000, Philip Paeps wrote: > > > Author: philip > > > Date: Fri Sep 6 01:19:31 2019 > > > New Revision: 351918 > > > URL: https://svnweb.freebsd.org/changeset/base/351918 > > > > > > Log: > > > riscv: default to HZ=100 > > > > > > Most current RISC-V development platforms are not fast enough > > > to > > > benefit > > > from the increased granularity provided by HZ=1000. > > > > > > Sponsored by: Axiado > > > > > > Modified: > > > head/sys/kern/subr_param.c > > > > > > Modified: head/sys/kern/subr_param.c > > > ================================================================= > > > ==== > > > ========= > > > --- head/sys/kern/subr_param.c Fri Sep 6 00:06:55 2019 ( > > > r351 > > > 917) > > > +++ head/sys/kern/subr_param.c Fri Sep 6 01:19:31 2019 ( > > > r351 > > > 918) > > > @@ -61,7 +61,7 @@ __FBSDID("$FreeBSD$"); > > > */ > > > > > > #ifndef HZ > > > -# if defined(__mips__) || defined(__arm__) > > > +# if defined(__mips__) || defined(__arm__) || defined(__riscv) > > > # define HZ 100 > > > # else > > > # define HZ 1000 > > > > > > > This seems like a bad idea. I've run a 90mhz armv4 chip with > > HZ=1000 > > and didn't notice any performance hit from doing so. Almost all > > arm > > kernel config files set HZ as an option, so that define doesn't do > > much for arm these days. It probably does still set HZ for > > various > > mips platforms. > > > > I would think 1000 is appropriate for anything modern running at > > 200mhz or more. > > > > Setting it to 100 has the bad side effect of making things like > > msleep(), tsleep(), and pause() (which show up in plenty of > > drivers) > > all have a minimum timeout of 10ms, which is a long long time on > > modern hardware. > > > > What benefit do you think you'll get from the lower number? > > On systems running at 10s of MHz (or slower, ick), with HZ=1000 you > spend an awful lot of time servicing the timer interrupt and not > very > much time doing anything else. > > My rationale was that most RISC-V systems (including emulation and > FPGA > prototypes) I've encountered are running slower than the tipping > point > where HZ=1000 makes sense. With the default of HZ=100, faster > exceptions can still set HZ=1000 in their individual configs. > > When the RISC-V world evolves to having more actual silicon and > fewer > slow prototypes, I definitely agree this default should be flipped > again > for HZ=1000 by default and HZ=100 in the config files for the > exceptions. > > Philip > Wait a second... are you saying that the riscv implementation doesn't support event timers and uses an old-style periodic tick based on HZ? I thought only ancient mips and armv5 systems still did that. Event timer based (so-called "tickless") systems only take timer interrupts when actually necessary -- either because something needs to wake up at that time, or just often enough to prevent timer rollovers, which is typically a number like 2 or 4 hz. -- Ian