lkml.org 
[lkml]   [2017]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC] Tagging of vmalloc pages for supporting the pmalloc allocator
From
Date


On 03/08/17 17:47, Jerome Glisse wrote:
> On Thu, Aug 03, 2017 at 03:55:50PM +0200, Michal Hocko wrote:
>> On Thu 03-08-17 15:20:31, Igor Stoppa wrote:

[...]

>>> I am confused about this: if "private2" is a pointer, but when I get an
>>> address, I do not even know if the address represents a valid pmalloc
>>> page, how can i know when it's ok to dereference "private2"?
>>
>> because you can make all pages which back vmalloc mappings have vm_area
>> pointer set.
>
> Note that i think this might break some device driver that use vmap()
> i think some of them use private field to store device driver specific
> informations. But there likely is an unuse field in struct page that
> can be use for that.

This increases the unease from my side ... it looks like there is no way
to fully understand if a field is really used or not, without having
deep intimate knowledge of lots of code that is only marginally involved :-/

Similarly, how would I be able to specify what would be the correct way
to decide the member of the union to use for handling the field?

If there were either some sort of non-multiplexed tag/cookie field or a
function, that would specify how to treat the various unions, then it
would be easier to multiplex the remaining data, according to how the
page is used.

--
igor

\
 
 \ /
  Last update: 2017-08-03 17:09    [W:2.331 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site