From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 18 09:00:25 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EDB4E106564A for ; Fri, 18 Feb 2011 09:00:25 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 627678FC08 for ; Fri, 18 Feb 2011 09:00:24 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p1I90J60023316 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 18 Feb 2011 11:00:19 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p1I90J9j006938; Fri, 18 Feb 2011 11:00:19 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p1I90Jwe006937; Fri, 18 Feb 2011 11:00:19 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 18 Feb 2011 11:00:19 +0200 From: Kostik Belousov To: Mats Lindberg Message-ID: <20110218090019.GZ78089@deviant.kiev.zoral.com.ua> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="S5Qg+bAg9m7PUrmf" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-hackers@freebsd.org Subject: Re: sched_setscheduler() behaviour changed?? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Feb 2011 09:00:26 -0000 --S5Qg+bAg9m7PUrmf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 17, 2011 at 10:50:06AM +0100, Mats Lindberg wrote: > All, > I have been using a small program /rt) that utilize the sched_setschedule= r() > syscall to set the scheduling policy of a process to SCHED_RR. Been runni= ng > it FBSD 5.x and 6.x. Now when migrating to FBSD 8.1 I get EPERM back at m= e. > used to be able to run it like e.g. > > ./rt -sr -p2 -- prog >=20 > which started in SCHED_RR policy with priority 2. >=20 > now in FBSD 8.1 I get EPERM >=20 > But If I do > > rtprio 10 ./rt -sr -p2 -- prog >=20 > it I dont get EPERM. >=20 > I'm always root when doing this. >=20 > My problem is that I have customers that need to run their old 5.x 6.x > applications 'as is' in 8.1 whithout changing anything. >=20 > Does anyone know if there is a workaround? > sysctl? kernel hint? kernel config? reverting to 4BSD scheduler? If you want help from the list, you should provide some data to diagnose the issue. Obviously, we cannot read the sources of your rt utility. At least, you can provide ktrace/kdump output for start. --S5Qg+bAg9m7PUrmf Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk1eNSMACgkQC3+MBN1Mb4gpMwCfdG/9y5M9NfMpKhx+AfBo3fbb PzcAniCBAUKW2lWYzH1mo0MhpCMxg8Kd =E6J1 -----END PGP SIGNATURE----- --S5Qg+bAg9m7PUrmf--