Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Feb 2016 18:35:46 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Svatopluk Kraus <onwahe@gmail.com>
Cc:        Justin Hibbits <jrh29@alumni.cwru.edu>, "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org>
Subject:   Re: RF_CACHEABLE flag
Message-ID:  <20160229163545.GW67250@kib.kiev.ua>
In-Reply-To: <CAFHCsPVgJt9OJdUtKixGF1XSWtRiD1F8ZHCD5SRodQ77Wm%2B=Sw@mail.gmail.com>
References:  <CAHSQbTA5A3uSDT143e3yWmfzWZyOCDJ4GSo6JO2NiLc_VAKoYg@mail.gmail.com> <20160222121836.GH91220@kib.kiev.ua> <CAHSQbTDZVpNU0WsXSHM8yuDqn_5vmy9Ox0fnLZLb2NJfoC7Exg@mail.gmail.com> <20160224102754.GK91220@kib.kiev.ua> <CAJ-VmomUxb7nR7cyg58zHVrVP3MB2JLLebWJPf7kB0F7NDpu6A@mail.gmail.com> <CAFHCsPVgJt9OJdUtKixGF1XSWtRiD1F8ZHCD5SRodQ77Wm%2B=Sw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Feb 29, 2016 at 05:18:16PM +0100, Svatopluk Kraus wrote:
> It's not so simple to change memory attributes on ARM. Some conditions
> must be met. So, a question is - in which circumstances
> pmap_change_attr() is used?
> 
> It's defined like
> int pmap_change_attr(vm_offset_t va, vm_size_t size, int mode);
> 
> (1) As memory attributes can be changed on a page basis only, the va
> and size are arranged according to that in i386 implementation. That's
> okay.
> 
> (2) Can the memory be used by somebody else while the attributes are
> being changed? In other words, can the memory be unmapped temporary?

Is this for the change of pte through invalidation ?  In other words,
do you mean, is it fine to temporary unmap the range during the
pmap_change_attr() execution ?

If yes, it is fine for uses of the function in the DRM code, since
it is utilized during a setup of things like GTT or buffers, and no
other accesses to the memory could happen until the setup is finished.

I noted that function is used by several network drivers as well, and
by ntb.  It seem that cxgbe and mxge also use it during setup.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160229163545.GW67250>