Re: [PATCH v2 7/7] alpha: lazy FPU switching

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 1, 2022 at 6:50 PM Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
>
>         On each context switch we save the FPU registers on stack
> of old process and restore FPU registers from the stack of new one.
> That allows us to avoid doing that each time we enter/leave the
> kernel mode; however, that can get suboptimal in some cases.

Do we really care, for what is effectively a dead architecture?

This patch feels like something that might have made sense 25 years
ago. Does it make sense today?

I guess I don't care (for the same reason), but just how much testing
has this gotten, and what subtle bugs might this have?

With the asm even having a comment about how it only works because
alpha doesn't do preemption (ARCH_NO_PREEMPT), but then the C code
does do those preempt_disable/enable pairs, and I see an actual bug in
there too:

Both alpha_read_fp_reg() and alpha_read_fp_reg_s() do a
preempt_enable() -> preempt_enable() pair (ie the first one should be
a preempt_disable()).

Does that bug matter? No. ARCH_NO_PREEMPT means that it's all no-ops
anyway. But it's wrong and I think shows the status of this patch -
well-meaning, but maybe not really fully thought out.

           Linus



[Index of Archives]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux