2019-11-12 02:14:14

by Bharat Kumar Gogada

[permalink] [raw]
Subject: DAX filesystem support on ARMv8

Hi All,

As per Documentation/filesystems/dax.txt

The DAX code does not work correctly on architectures which have virtually
mapped caches such as ARM, MIPS and SPARC.

Can anyone please shed light on dax filesystem issue w.r.t ARM architecture ?

Regards,
Bharat


2019-11-12 09:51:54

by Jan Kara

[permalink] [raw]
Subject: Re: DAX filesystem support on ARMv8

Hi!

On Tue 12-11-19 02:12:09, Bharat Kumar Gogada wrote:
> As per Documentation/filesystems/dax.txt
>
> The DAX code does not work correctly on architectures which have virtually
> mapped caches such as ARM, MIPS and SPARC.
>
> Can anyone please shed light on dax filesystem issue w.r.t ARM architecture ?

I've CCed Dan, he might have idea what that comment means :)

Out of curiosity, why do you care?

Honza

--
Jan Kara <[email protected]>
SUSE Labs, CR

2019-11-12 17:16:36

by Dan Williams

[permalink] [raw]
Subject: Re: DAX filesystem support on ARMv8

On Mon, Nov 11, 2019 at 6:12 PM Bharat Kumar Gogada <[email protected]> wrote:
>
> Hi All,
>
> As per Documentation/filesystems/dax.txt
>
> The DAX code does not work correctly on architectures which have virtually
> mapped caches such as ARM, MIPS and SPARC.
>
> Can anyone please shed light on dax filesystem issue w.r.t ARM architecture ?

The concern is VIVT caches since the kernel will want to flush pmem
addresses with different virtual addresses than what userspace is
using. As far as I know, ARMv8 has VIPT caches, so should not have an
issue. Willy initially wrote those restrictions, but I am assuming
that the concern was managing the caches in the presence of virtual
aliases.

2019-11-12 22:03:25

by Matthew Wilcox

[permalink] [raw]
Subject: Re: DAX filesystem support on ARMv8

On Tue, Nov 12, 2019 at 09:15:18AM -0800, Dan Williams wrote:
> On Mon, Nov 11, 2019 at 6:12 PM Bharat Kumar Gogada <[email protected]> wrote:
> >
> > Hi All,
> >
> > As per Documentation/filesystems/dax.txt
> >
> > The DAX code does not work correctly on architectures which have virtually
> > mapped caches such as ARM, MIPS and SPARC.
> >
> > Can anyone please shed light on dax filesystem issue w.r.t ARM architecture ?
>
> The concern is VIVT caches since the kernel will want to flush pmem
> addresses with different virtual addresses than what userspace is
> using. As far as I know, ARMv8 has VIPT caches, so should not have an
> issue. Willy initially wrote those restrictions, but I am assuming
> that the concern was managing the caches in the presence of virtual
> aliases.

The kernel will also access data at different virtual addresses from
userspace. So VIVT CPUs will be mmap/read/write incoherent, as well as
being flush incoherent.

2019-11-14 06:55:59

by Bharat Kumar Gogada

[permalink] [raw]
Subject: RE: DAX filesystem support on ARMv8

>
> On Tue, Nov 12, 2019 at 09:15:18AM -0800, Dan Williams wrote:
> > On Mon, Nov 11, 2019 at 6:12 PM Bharat Kumar Gogada
> <[email protected]> wrote:
> > >
> > > Hi All,
> > >
> > > As per Documentation/filesystems/dax.txt
> > >
> > > The DAX code does not work correctly on architectures which have
> > > virtually mapped caches such as ARM, MIPS and SPARC.
> > >
> > > Can anyone please shed light on dax filesystem issue w.r.t ARM architecture
> ?
> >
> > The concern is VIVT caches since the kernel will want to flush pmem
> > addresses with different virtual addresses than what userspace is
> > using. As far as I know, ARMv8 has VIPT caches, so should not have an
> > issue. Willy initially wrote those restrictions, but I am assuming
> > that the concern was managing the caches in the presence of virtual
> > aliases.
>
> The kernel will also access data at different virtual addresses from userspace.
> So VIVT CPUs will be mmap/read/write incoherent, as well as being flush
> incoherent.

Thanks a lot Wilcox and Dan for clarification.
So the above restriction only applies to ARM architectures with VIVT caches and not
for VIPT caches.


Regards,
Bharat

2019-12-01 22:01:04

by Jon Masters

[permalink] [raw]
Subject: Re: DAX filesystem support on ARMv8

On 11/14/19 1:54 AM, Bharat Kumar Gogada wrote:
>>
>> On Tue, Nov 12, 2019 at 09:15:18AM -0800, Dan Williams wrote:
>>> On Mon, Nov 11, 2019 at 6:12 PM Bharat Kumar Gogada
>> <[email protected]> wrote:
>>>>
>>>> Hi All,
>>>>
>>>> As per Documentation/filesystems/dax.txt
>>>>
>>>> The DAX code does not work correctly on architectures which have
>>>> virtually mapped caches such as ARM, MIPS and SPARC.
>>>>
>>>> Can anyone please shed light on dax filesystem issue w.r.t ARM architecture
>> ?
>>>
>>> The concern is VIVT caches since the kernel will want to flush pmem
>>> addresses with different virtual addresses than what userspace is
>>> using. As far as I know, ARMv8 has VIPT caches, so should not have an
>>> issue. Willy initially wrote those restrictions, but I am assuming
>>> that the concern was managing the caches in the presence of virtual
>>> aliases.
>>
>> The kernel will also access data at different virtual addresses from userspace.
>> So VIVT CPUs will be mmap/read/write incoherent, as well as being flush
>> incoherent.
>
> Thanks a lot Wilcox and Dan for clarification.
> So the above restriction only applies to ARM architectures with VIVT caches and not
> for VIPT caches.

VMSAv8-64 (Armv8) requires that data caches behave as if they were PIPT.
Meaning there is not a situation as described above.

Jon.

--
Computer Architect