From owner-freebsd-current@FreeBSD.ORG Thu May 29 05:17:38 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BAEE8B6C for ; Thu, 29 May 2014 05:17:38 +0000 (UTC) Received: from mail-qg0-x234.google.com (mail-qg0-x234.google.com [IPv6:2607:f8b0:400d:c04::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7824F2C92 for ; Thu, 29 May 2014 05:17:38 +0000 (UTC) Received: by mail-qg0-f52.google.com with SMTP id a108so20760459qge.39 for ; Wed, 28 May 2014 22:17:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=BbBmQOgOoQjHyiksrXZG22DqZuX10c46fNYPQN1/DRk=; b=MTTnRfiX/FcWeT3hFwuLN9L9nOoDis6/RNPhS6sMEG1AhhZ6+RaLgZFnNCCger7lZa mMUdX3pJXCWcJRwj25vwq9Ssqf7RUxAWV3PdW4FbVlHye1i+5baO0AuaXFAIgInwiaY8 LLyYlZprAe2ANTDxxvDXpjM0B3WBtbbx/oHK+olgYkP+lov5xmrLaNAzxz96g+C8BmFQ WhPapIp1AXz+LS6nNrHrNDa0M3FJPkmD9IWtNHKl3Zs3AOKTFs5iXplxTiKNP63k7Isg Psl9dl+WFbeozx9+XxJwma0Bcm2SOFLMyuuaDqGzMAuqMdiYtRMHB3tJrEal39VJQ1CD 0nqw== MIME-Version: 1.0 X-Received: by 10.140.35.212 with SMTP id n78mr5735029qgn.87.1401340657408; Wed, 28 May 2014 22:17:37 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.191.201 with HTTP; Wed, 28 May 2014 22:17:37 -0700 (PDT) In-Reply-To: References: Date: Wed, 28 May 2014 22:17:37 -0700 X-Google-Sender-Auth: K1j29Kzyvw7VtvJxVn0CHxRN9Ro Message-ID: Subject: Re: Thread Scheduler Priority From: Adrian Chadd To: Fred Pedrisa Content-Type: text/plain; charset=UTF-8 Cc: freebsd-current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 May 2014 05:17:38 -0000 are you doing this all as root? -a On 28 May 2014 22:12, Fred Pedrisa wrote: > Hi, Guys. > > > > How can I adjust a certain thread to have the maximum system priority in the > scheduler ? > > > > I've tried doing it this way : > > > > /* Set thread priority. */ > > if > (pthread_getschedparam(ts[gnThreadID], &police, ¶m[gnThreadID]) != 0) > > { > > error > ("Unable to get priority"); > > return 1; > > } > > > param[gnThreadID].sched_priority = 99; > > if > (pthread_setschedparam(ts[gnThreadID], police, ¶m[gnThreadID]) != 0) > > { > > error("Unable to set priority"); > > return 1; > > } > > > > However, in 'top', I don't see the process threads switching to -92 > priority, like other threads in the system, is something I did wrong or > maybe I might be missing something ? > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"