[PATCH, RFC] um: remove set_fs
Anton Ivanov
anton.ivanov at cambridgegreys.com
Mon Aug 23 05:29:26 PDT 2021
On 23/08/2021 13:17, Christoph Hellwig wrote:
> On Mon, Aug 23, 2021 at 09:28:37AM +0100, Anton Ivanov wrote:
>> In first read - you do not want to do that.
>>
>> buffer_op is slow (even with all the tweaks we have done to that). It is one of the reasons UML userspace is slower than it should be.
>>
>> The primary reason for that is that it never copies more than a page at a time and pages in/out a page at a time.
>>
>> We retain reasonable kernel speed because we bypass it for kernel - "if (uaccess_kernel())".
>>
>> Unless I am missing something, this change will use the slow path currently used for userspace for the kernel.
> uaccess_kernel() is not the fast path, it is the exception path when
> someone uses the uaccess helper on kernel pointer after doing a
> set_fs(KERNEL_DS). And this path is entirel gone once CONFIG_SET_FS
> is not set and replaced with calls to __get_kernel_nofault /
> __put_kernel_nofault.
OK. Cool.
>
> In other words - very little generated code actually changes with
> this patch, except for the context switch path, which gets simplified.
I am going to test it and play with it later.
Thanks for the explanation.
Brgds,
>
> _______________________________________________
> linux-um mailing list
> linux-um at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-um
>
--
Anton R. Ivanov
Cambridgegreys Limited. Registered in England. Company Number 10273661
https://www.cambridgegreys.com/
More information about the linux-um
mailing list