Re: [PATCH v2] Pre-emption control for userspace

From: Andi Kleen
Date: Tue Mar 25 2014 - 15:47:37 EST


On Tue, Mar 25, 2014 at 12:47:52PM -0600, Khalid Aziz wrote:
> I am not sure if it would be practical and useful to integrate this
> into any of the standard locking interfaces, but I have not looked
> into it much either. My initial intent is to let individual apps
> decide if they could benefit from this interface and code it in if
> so since the interface is meant to be very simple. Do you see any of
> the standard locking interfaces where it would make sense to
> integrate this feature in, or are you thinking of creating a new
> interface?

It would probably make sense to use by default with glibc adaptive mutexes.

> I am reluctant to make it too big since reading larger quantities
> from userspace will take longer and start to impact performance.
> Keeping shared data limited to 32-bits allows us to move it between
> userspace and kernel with one instruction.

You don't need to read/write more. Just reserve more so that it
can be sensibly extended later.

The feature bits would only need to be written once when it is set up.


-Andi
--
ak@xxxxxxxxxxxxxxx -- Speaking for myself only.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/