From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752179AbaCFMNj (ORCPT ); Thu, 6 Mar 2014 07:13:39 -0500 Received: from chicago.guarana.org ([192.210.136.102]:45514 "EHLO chicago.guarana.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751988AbaCFMNi (ORCPT ); Thu, 6 Mar 2014 07:13:38 -0500 Date: Thu, 6 Mar 2014 23:13:33 +1100 From: Kevin Easton To: Andi Kleen Cc: Thomas Gleixner , Khalid Aziz , One Thousand Gnomes , "H. Peter Anvin" , Ingo Molnar , peterz@infradead.org, akpm@linux-foundation.org, viro@zeniv.linux.org.uk, oleg@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [RFC] [PATCH] Pre-emption control for userspace Message-ID: <20140306121333.GA12127@chicago.guarana.org> References: <1393870033-31076-1-git-send-email-khalid.aziz@oracle.com> <531641A8.40306@zytor.com> <53164824.3000704@oracle.com> <20140304222356.41c55bbc@alan.etchedpixels.co.uk> <5316574F.6040105@oracle.com> <8738ix5uyk.fsf@tassilo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8738ix5uyk.fsf@tassilo.jf.intel.com> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 04, 2014 at 04:51:15PM -0800, Andi Kleen wrote: > Anything else? If it was possible to make the time remaining in the current timeslice available to userspace through the vdso, the thread could do something like: if (sys_timeleft() < CRITICAL_SECTION_SIZE) yield(); lock(); to avoid running out of timeslice in the middle of the critical section. - Kevin