On 12/25/2015 11:27 PM, David Miller wrote:
From: Rob Gardner <rob.gardner@xxxxxxxxxx>
Date: Fri, 25 Dec 2015 22:02:43 -0700
Also, in the code we submitted, there was an optimization in which
%asi is read, and then only set to ASI_AIUS if necessary. This
drastically reduces the number of writes to the %asi register since
most of the time %asi will contain ASI_AIUS. This seems like a
reasonable optimization, since this function may be called thousands
of times per second on every cpu.
I noticed the optimization.
If this was happening for every memcpy call, I'd say it's worth it.
But it's happening once for a series of memcpy/copy_from_user_inatomic()
calls so I'd say it's not really worth it.
So unless you can show me how the current version fails, I'm keeping it
as-is because either we should consistently use set_fs/get_fs in C
code rather than open coded inline asm, or we should create a well
documented set of helper functions for this specific situation and
_ALSO_ use it elsewhere where the same problems exist such as some
of the uses of set_fs/get_fs in process_64.c
Fair enough. You've convinced me that my worries are unfounded. Let's
consider the matter settled. Thanks.
Rob
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html