From owner-svn-src-all@freebsd.org Thu Mar 5 14:45:37 2020 Return-Path: Delivered-To: svn-src-all@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 1C1DC26B70A; Thu, 5 Mar 2020 14:45:37 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay103.isp.belgacom.be (mailrelay103.isp.belgacom.be [195.238.20.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "relay.skynet.be", Issuer "GlobalSign RSA OV SSL CA 2018" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YD7h2HTZz3CjZ; Thu, 5 Mar 2020 14:45:36 +0000 (UTC) (envelope-from tijl@freebsd.org) IronPort-SDR: w7SpOBJDBGbdTO9EGjDn+FdBxolappx+dQd9AkqiXr0i46ntIBK3KKS9DVEc8h9ZqxbyOGb9Zh 2itXC97mYtVlC4ZSw1TLuIRxG/GwhPjIcuDMt6VkNItAcCLZHlccwIKV56KtxlxXv+4M+3ldrL g5ncYN4wva6KsVwtQXpRxmd2QwsMqmI6a0wsqN6JLLldiVBczccyWjA1JzjJ4uV/AryO5bglo6 bR9rmTFRHbpnUP2eACPkyHYSrsgaEEZH7gjwuOuTCi1U5XFI5FxA+X8Cxr4hVqQB4lm/Vi5sVd pbw= X-Belgacom-Dynamic: yes IronPort-PHdr: =?us-ascii?q?9a23=3ANRPBVRy5WKW1vHHXCy+O+j09IxM/srCxBDY+r6?= =?us-ascii?q?Qd2uIVIJqq85mqBkHD//Il1AaPAdyHrasd06GI4+jJYi8p39WoiDg6aptCVh?= =?us-ascii?q?sI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFR?= =?us-ascii?q?rhKAF7Ovr6GpLIj8Swyuu+54Dfbx9HiTagbr5+Ngi6oRjNusUZgIZvKbs6xw?= =?us-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6ij6Ka0y?= =?us-ascii?q?egA5JafGdGCkqDEX3wbYWLR+8MaD6OIs9mijEETqKhRJM42R6ysw/6zr9nLu?= =?us-ascii?q?vI+i0Eq53jzsN16vbdlREo6zN7Ed+S03qQQG1umWMIXTA2j+hDphlM102CmZ?= =?us-ascii?q?Bxhf9fC5QH9utAVAQ9K7bSxvdmDtnzXkTKedLfG3i8RdDzPdY1Bvk2xMQDZk?= =?us-ascii?q?97AJ32khHB2wKEGbIYvYenQpsu/fSPjDDKO89hxiOeh+EahF48T54KbDX+iw?= =?us-ascii?q?=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2BGAQBdD2Fe/8Ub9FFmHAEBAQEBBwE?= =?us-ascii?q?BEQEEBAEBgWkFAQELAQGBeyxZE1QBIBIqjRiFfwGCEIg9gSZ8jmSBewkBAQE?= =?us-ascii?q?BAQEBAQErDAQBAYFPgnQCggsnNgcOAgMBAQEDAgUBAQYBAQEBAQEEBAFsBAE?= =?us-ascii?q?BBwoCAYROIQEDAQEFCgE3DEIBEAGBZykBgn8BBTocIxALDgYECSUPEjYGE4M?= =?us-ascii?q?ngkoDMguvGYQ1AQsBgQiCWg2BG38GgTgBjECCAIERgxQ+ghuCMIVvBJdgl31?= =?us-ascii?q?EgkaHUopehCoomzSER5MqgjCSIgMvgVhNMAiDJ1AYDY9EAQMEh1iFQkADMII?= =?us-ascii?q?kjGEBAQ?= X-IPAS-Result: =?us-ascii?q?A2BGAQBdD2Fe/8Ub9FFmHAEBAQEBBwEBEQEEBAEBgWkFA?= =?us-ascii?q?QELAQGBeyxZE1QBIBIqjRiFfwGCEIg9gSZ8jmSBewkBAQEBAQEBAQErDAQBA?= =?us-ascii?q?YFPgnQCggsnNgcOAgMBAQEDAgUBAQYBAQEBAQEEBAFsBAEBBwoCAYROIQEDA?= =?us-ascii?q?QEFCgE3DEIBEAGBZykBgn8BBTocIxALDgYECSUPEjYGE4MngkoDMguvGYQ1A?= =?us-ascii?q?QsBgQiCWg2BG38GgTgBjECCAIERgxQ+ghuCMIVvBJdgl31EgkaHUopehCoom?= =?us-ascii?q?zSER5MqgjCSIgMvgVhNMAiDJ1AYDY9EAQMEh1iFQkADMIIkjGEBAQ?= Received: from 197.27-244-81.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([81.244.27.197]) by relay.skynet.be with ESMTP; 05 Mar 2020 15:45:33 +0100 Received: from localhost (localhost [127.0.0.1]) by kalimero.tijl.coosemans.org (8.15.2/8.15.2) with ESMTP id 025EjWNM027963; Thu, 5 Mar 2020 15:45:32 +0100 (CET) (envelope-from tijl@FreeBSD.org) Date: Thu, 5 Mar 2020 15:45:31 +0100 From: =?UTF-8?B?VMSzbA==?= Coosemans To: Yuri Pankov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r358483 - head/sys/compat/linux Message-ID: <20200305154531.35af1599@FreeBSD.org> In-Reply-To: References: <202003011312.021DC4vh022404@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 48YD7h2HTZz3CjZ X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-0.54 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_SPAM_MEDIUM(0.44)[0.437,0]; ASN(0.00)[asn:5432, ipnet:195.238.0.0/19, country:BE]; NEURAL_HAM_LONG(-0.97)[-0.973,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 14:45:37 -0000 On Thu, 5 Mar 2020 16:15:10 +0300 Yuri Pankov wrote: > Tijl Coosemans wrote: >> Author: tijl >> Date: Sun Mar 1 13:12:04 2020 >> New Revision: 358483 >> URL: https://svnweb.freebsd.org/changeset/base/358483 >> >> Log: >> linuxulator: Map scheduler priorities to Linux priorities. >> >> On Linux the valid range of priorities for the SCHED_FIFO and SCHED_RR >> scheduling policies is [1,99]. For SCHED_OTHER the single valid priority is >> 0. On FreeBSD it is [0,31] for all policies. Programs are supposed to >> query the valid range using sched_get_priority_(min|max), but of course some >> programs assume the Linux values are valid. >> >> This commit adds a tunable compat.linux.map_sched_prio. When enabled >> sched_get_priority_(min|max) return the Linux values and sched_setscheduler >> and sched_(get|set)param translate between FreeBSD and Linux values. >> >> Because there are more Linux levels than FreeBSD levels, multiple Linux >> levels map to a single FreeBSD level, which means pre-emption might not >> happen as it does on Linux, so the tunable allows to disable this behaviour. >> It is enabled by default because I think it is unlikely that anyone runs >> real-time software under Linux emulation on FreeBSD that critically relies >> on correct pre-emption. >> >> This fixes FMOD, a commercial sound library used by several games. >> >> PR: 240043 >> Tested by: Alex S >> Reviewed by: dchagin >> MFC after: 2 weeks >> Differential Revision: https://reviews.freebsd.org/D23790 >> >> Modified: >> head/sys/compat/linux/linux_misc.c >> head/sys/compat/linux/linux_misc.h >> >> Modified: head/sys/compat/linux/linux_misc.c >> ============================================================================== >> --- head/sys/compat/linux/linux_misc.c Sun Mar 1 12:34:27 2020 (r358482) >> +++ head/sys/compat/linux/linux_misc.c Sun Mar 1 13:12:04 2020 (r358483) >> @@ -144,6 +144,11 @@ struct l_pselect6arg { >> l_size_t ss_len; >> }; >> >> +static bool map_sched_prio = true; >> +SYSCTL_BOOL(_compat_linux, OID_AUTO, map_sched_prio, CTLFLAG_RDTUN, >> + &map_sched_prio, 0, "Map scheduler priorities to Linux priorities " >> + "(not POSIX compliant)"); > > I'm seeing the following in the log: > > sysctl_warn_reuse: can't re-use a leaf (compat.linux.map_sched_prio)! > > Should this be done for both linux and linux32 (when one exists) or made > to install one time only? Ah, thanks for the report, I've moved it to linux_common in r358673.