Re: Update of file offset on write() etc. is non-atomic with I/O

From: Linus Torvalds
Date: Mon Mar 03 2014 - 18:59:47 EST


On Mon, Mar 3, 2014 at 3:42 PM, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
> On Mon, Mar 03, 2014 at 03:34:43PM -0800, Linus Torvalds wrote:
>>
>> (Side note: I think sparc or something doesn't support it, and may
>> return things in memory. I can't really seem to find it in myself to
>> care)
>
> sparc64 actually does support that. So does amd64, and, with explicit
> flag, i386. No other more or less general purpose architecture does.
>
> Not ppc. Not mips. Not arm. I think that some of those are worth
> caring about...

I doubt it's worth caring about. Even when passing things in memory,
the end result isn't that much worse than the fget_light() model that
passes just one of the two fields in memory.

If the ARM/PPC people end up caring, they could add the struct-return
support to gcc. It should be basically just adding the flag for
enabling the calling convention - the core gcc support is obviously
all there, and it's just an issue of whether the calling conventions
allow it or not.

Linus
--
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/