On Wed Jan 24 22:01:20 2024 +0000, Jacek Caban wrote:
I am not sure how xsaveopt can help?
xsaveopt may skip storing even dirty parts if they didn't change since last restore. It's not possible to use it reliably from user space, so that's a possibility for Windows, but not for us. More generally, the change on its own, without avx512 context, does not look all that profitable. It's optimizing only a chunk of overall slow operation. Eg. the interesting metric is how much it takes for APC to be delivered to client and I'd expect the patch to have minor impact on that. I understand that the impact will be bigger with avx512, but it's hard for me to comment on that without seeing the rest of it. For example how context_t will look like? Will it just grow? If transfer cost is high, do we want all platforms to pay it? BTW, while suspending calls are more rare and indeed less time critical, their performance is not meaningless, see bug 45546 for example.
Yes, probably variable size server context (at least for transfer, possibly keeping the structure size constant?) is unavodiable, doesn't make sense for all the archs pay the cost of huge x86 xstate.
What do you think about using a separate signal? If it is possible then it would optimize APCs without increasing the cost for any other cases.