[Intel-gfx] [RFC 0/3] Add new ioctl to resize gem object for deferred allocation
Siluvery, Arun
arun.siluvery at linux.intel.com
Mon Apr 7 15:18:22 CEST 2014
On 27/03/2014 22:23, Chris Wilson wrote:
> On Thu, Mar 27, 2014 at 03:28:26PM +0000, arun.siluvery at linux.intel.com wrote:
>> From: "Siluvery, Arun" <arun.siluvery at intel.com>
>>
>> This patch series adds a new ioctl to resize a gem object.
>
> I'm tired, but off the top of my head, I think you can do away with the
> magic extension to create_ioctl. If we allow any one to fallocate()
> ranges of any object, the user can create a large object, populate it
> all with a scratch page, then later populate regions as required. This
> looks quite a reasonable and useful feature.
> -Chris
>
Could you clarify my understanding on how to use fallocate() to resize
the object, considering the case where we start with an object of size x
and want to increase its size to (x+y) at a later point.
My understanding is, first object is created with gem_create ioctl with
size x. At a later point if it is to be resized, we allocate y at the
end of x using fallocate(). It is allocating the pages for us and from
its implementation it is clear that the file size is updated with new
value if offset+len is greater than initial size.
Do we need to make any changes for GEM to get the new size or it is
completely transparent to it?
could you give an overview on how you think it should work?
regards
Arun
More information about the Intel-gfx
mailing list