From owner-freebsd-hackers@freebsd.org Sat Jan 14 16:15:32 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C679CCAF5F4 for ; Sat, 14 Jan 2017 16:15:32 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A4C221964 for ; Sat, 14 Jan 2017 16:15:32 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (ppp121-45-252-76.lns20.per4.internode.on.net [121.45.252.76]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id v0EGFRaC016184 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sat, 14 Jan 2017 08:15:30 -0800 (PST) (envelope-from julian@freebsd.org) Subject: Re: Why regular user with realtime priority can't run pthread_setschedparam(3) with sched_priority=10 ? To: Yuri , Freebsd hackers list References: <52cf051e-8c8a-d844-2756-9d2079cdd33d@rawbw.com> From: Julian Elischer Message-ID: Date: Sun, 15 Jan 2017 00:15:21 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <52cf051e-8c8a-d844-2756-9d2079cdd33d@rawbw.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 16:15:32 -0000 On 9/01/2017 7:26 AM, Yuri wrote: > The process (jackd) calls this code: > > rtparam.sched_priority = priority; // =10 > > if ((x = pthread_setschedparam (thread, SCHED_FIFO, > &rtparam)) != 0) { > > It succeeds when the process is run as 'root'. > It fails when the process is run as a regular user with realtime > priority (set with rtprio 0): Operation not permitted > > Why realtime priority of the process doesn't make high priority > threads possible? high priority threads have for all of unix history required special permissions (e.g. root) as they can negatively inpact other users. It is assumed htat if you want to do rt work you must have root permissions > > Yuri > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to > "freebsd-hackers-unsubscribe@freebsd.org" >