Re: [Intel-gfx] [Beignet] Preventing zero GPU virtual address allocation

2015-03-19 Thread Song, Ruiling
> Yeah my big concern was with not making this opt-in like the old patch or > adding an interface which does a lot more than what we need right now > (Chris' patch). Just a bitflag to ask for this seems best and is fine with me. > > And for the implementation I think we should reuse the PIN_BIAS

Re: [Intel-gfx] [Beignet] Preventing zero GPU virtual address allocation

2015-03-19 Thread Daniel Vetter
On Thu, Mar 19, 2015 at 12:09:53PM +0200, David Weinehall wrote: > On Thu, Mar 19, 2015 at 03:22:42AM +, Song, Ruiling wrote: > > > > > Yeah, MAP_FIXED sounds a bit more ambitious and though I think it would > > > work for OCL 2.0 pointer sharing, it's a little different than we were > > > pl

Re: [Intel-gfx] [Beignet] Preventing zero GPU virtual address allocation

2015-03-19 Thread David Weinehall
On Thu, Mar 19, 2015 at 03:22:42AM +, Song, Ruiling wrote: > > > Yeah, MAP_FIXED sounds a bit more ambitious and though I think it would > > work for OCL 2.0 pointer sharing, it's a little different than we were > > planning. > > To summarize, we have three possible approaches, each with its

Re: [Intel-gfx] [Beignet] Preventing zero GPU virtual address allocation

2015-03-18 Thread Song, Ruiling
> Yeah, MAP_FIXED sounds a bit more ambitious and though I think it would > work for OCL 2.0 pointer sharing, it's a little different than we were > planning. > To summarize, we have three possible approaches, each with its own > problems: > 1) simple patch to avoid binding at address 0 in PPGT

Re: [Intel-gfx] [Beignet] Preventing zero GPU virtual address allocation

2015-03-17 Thread Jesse Barnes
>>> Yeah we'll rebind if needed. We can make this an execbuf or context >>> flag, in either case anything that gets executed by ocl will be moved >>> around if it accidentally ended up at the wrong place. The only >>> exception is if a buffer is pinned already, i.e. if you're doing >>> direct rende

Re: [Intel-gfx] [Beignet] Preventing zero GPU virtual address allocation

2015-03-17 Thread Daniel Vetter
On Mon, Mar 16, 2015 at 01:10:28PM -0700, Jesse Barnes wrote: > On 03/16/2015 01:52 AM, Daniel Vetter wrote: > > On Mon, Mar 16, 2015 at 02:29:24AM +, Song, Ruiling wrote: > >> > >> > >>> -Original Message- > >>> From: Daniel Vetter [mailto:daniel.vet...@ffwll.ch] On Behalf Of Daniel >

Re: [Intel-gfx] [Beignet] Preventing zero GPU virtual address allocation

2015-03-16 Thread Zou, Nanhai
ng, Rong R; > beig...@lists.freedesktop.org; Weinehall, David > Subject: Re: [Intel-gfx] [Beignet] Preventing zero GPU virtual address > allocation > > On 03/16/2015 01:52 AM, Daniel Vetter wrote: > > On Mon, Mar 16, 2015 at 02:29:24AM +, Song, Ruiling wrote: > >> > >> &

Re: [Intel-gfx] [Beignet] Preventing zero GPU virtual address allocation

2015-03-16 Thread Zhigang Gong
On Mon, Mar 16, 2015 at 01:10:28PM -0700, Jesse Barnes wrote: > On 03/16/2015 01:52 AM, Daniel Vetter wrote: > > On Mon, Mar 16, 2015 at 02:29:24AM +, Song, Ruiling wrote: > >> > >> > >>> -Original Message- > >>> From: Daniel Vetter [mailto:daniel.vet...@ffwll.ch] On Behalf Of Daniel >

Re: [Intel-gfx] [Beignet] Preventing zero GPU virtual address allocation

2015-03-16 Thread Jesse Barnes
On 03/16/2015 01:52 AM, Daniel Vetter wrote: > On Mon, Mar 16, 2015 at 02:29:24AM +, Song, Ruiling wrote: >> >> >>> -Original Message- >>> From: Daniel Vetter [mailto:daniel.vet...@ffwll.ch] On Behalf Of Daniel >>> Vetter >>> Sent: Saturday, March 14, 2015 1:14 AM >>> To: Chris Wilson;

Re: [Intel-gfx] [Beignet] Preventing zero GPU virtual address allocation

2015-03-16 Thread Jesse Barnes
On 03/16/2015 01:52 AM, Daniel Vetter wrote: > On Mon, Mar 16, 2015 at 02:29:24AM +, Song, Ruiling wrote: >> >> >>> -Original Message- >>> From: Daniel Vetter [mailto:daniel.vet...@ffwll.ch] On Behalf Of Daniel >>> Vetter >>> Sent: Saturday, March 14, 2015 1:14 AM >>> To: Chris Wilson;

Re: [Intel-gfx] [Beignet] Preventing zero GPU virtual address allocation

2015-03-16 Thread Daniel Vetter
On Mon, Mar 16, 2015 at 02:29:24AM +, Song, Ruiling wrote: > > > > -Original Message- > > From: Daniel Vetter [mailto:daniel.vet...@ffwll.ch] On Behalf Of Daniel > > Vetter > > Sent: Saturday, March 14, 2015 1:14 AM > > To: Chris Wilson; Daniel Vetter; Weinehall, David; Zou, Nanhai; S

Re: [Intel-gfx] [Beignet] Preventing zero GPU virtual address allocation

2015-03-15 Thread Song, Ruiling
> -Original Message- > From: Daniel Vetter [mailto:daniel.vet...@ffwll.ch] On Behalf Of Daniel > Vetter > Sent: Saturday, March 14, 2015 1:14 AM > To: Chris Wilson; Daniel Vetter; Weinehall, David; Zou, Nanhai; Song, Ruiling; > Vetter, Daniel; intel-gfx@lists.freedesktop.org; Yang, Rong R

Re: [Intel-gfx] [Beignet] Preventing zero GPU virtual address allocation

2015-03-13 Thread Daniel Vetter
On Fri, Mar 13, 2015 at 05:34:22PM +, Chris Wilson wrote: > On Fri, Mar 13, 2015 at 06:13:39PM +0100, Daniel Vetter wrote: > > On Fri, Mar 13, 2015 at 04:58:47PM +, Chris Wilson wrote: > > > On Fri, Mar 13, 2015 at 10:27:38AM +0100, Daniel Vetter wrote: > > > > If supporting systems without

Re: [Intel-gfx] [Beignet] Preventing zero GPU virtual address allocation

2015-03-13 Thread Chris Wilson
On Fri, Mar 13, 2015 at 06:13:39PM +0100, Daniel Vetter wrote: > On Fri, Mar 13, 2015 at 04:58:47PM +, Chris Wilson wrote: > > On Fri, Mar 13, 2015 at 10:27:38AM +0100, Daniel Vetter wrote: > > > If supporting systems without full ppgtt is a requirement for you (still > > > wonky on gen8 a bit,

Re: [Intel-gfx] [Beignet] Preventing zero GPU virtual address allocation

2015-03-13 Thread Daniel Vetter
On Fri, Mar 13, 2015 at 04:58:47PM +, Chris Wilson wrote: > On Fri, Mar 13, 2015 at 10:27:38AM +0100, Daniel Vetter wrote: > > If supporting systems without full ppgtt is a requirement for you (still > > wonky on gen8 a bit, so might be a good strategy) then imo it's the > > PIN_BIAS idea I've

Re: [Intel-gfx] [Beignet] Preventing zero GPU virtual address allocation

2015-03-13 Thread Chris Wilson
On Fri, Mar 13, 2015 at 10:27:38AM +0100, Daniel Vetter wrote: > If supporting systems without full ppgtt is a requirement for you (still > wonky on gen8 a bit, so might be a good strategy) then imo it's the > PIN_BIAS idea I've laid out earlier in this thread. That one will work > everywhere. soft

Re: [Intel-gfx] [Beignet] Preventing zero GPU virtual address allocation

2015-03-13 Thread Daniel Vetter
On Fri, Mar 13, 2015 at 11:10:56AM +0200, David Weinehall wrote: > On 2015-03-09 14:02, Chris Wilson wrote: > >On Mon, Mar 09, 2015 at 02:34:46AM +, Zou, Nanhai wrote: > >>We don't need MAP_FIXED, we just want to avoid address 0 to be allocated. > >> > >>Though I think using MAP_FIXED is overki

Re: [Intel-gfx] [Beignet] Preventing zero GPU virtual address allocation

2015-03-13 Thread Chris Wilson
On Fri, Mar 13, 2015 at 11:10:56AM +0200, David Weinehall wrote: > On 2015-03-09 14:02, Chris Wilson wrote: > >On Mon, Mar 09, 2015 at 02:34:46AM +, Zou, Nanhai wrote: > >>We don't need MAP_FIXED, we just want to avoid address 0 to be allocated. > >> > >>Though I think using MAP_FIXED is overki

Re: [Intel-gfx] [Beignet] Preventing zero GPU virtual address allocation

2015-03-13 Thread David Weinehall
On 2015-03-09 14:02, Chris Wilson wrote: On Mon, Mar 09, 2015 at 02:34:46AM +, Zou, Nanhai wrote: We don't need MAP_FIXED, we just want to avoid address 0 to be allocated. Though I think using MAP_FIXED is overkill, will bring much unnecessary complexity on both kernel and beignet side. I

Re: [Intel-gfx] [Beignet] Preventing zero GPU virtual address allocation

2015-03-09 Thread Zou, Nanhai
> -Original Message- > From: Chris Wilson [mailto:ch...@chris-wilson.co.uk] > Sent: Monday, March 09, 2015 8:02 PM > To: Zou, Nanhai > Cc: Daniel Vetter; Song, Ruiling; Vetter, Daniel; > intel-gfx@lists.freedesktop.org; > Yang, Rong R; beig...@lists.freedesktop.org; Weinehall, David > Subj

Re: [Intel-gfx] [Beignet] Preventing zero GPU virtual address allocation

2015-03-09 Thread Chris Wilson
On Mon, Mar 09, 2015 at 02:34:46AM +, Zou, Nanhai wrote: > We don't need MAP_FIXED, we just want to avoid address 0 to be allocated. > > Though I think using MAP_FIXED is overkill, will bring much unnecessary > complexity on both kernel and beignet side. > I don't mind if people can provide s

Re: [Intel-gfx] [Beignet] Preventing zero GPU virtual address allocation

2015-03-08 Thread Zou, Nanhai
We don't need MAP_FIXED, we just want to avoid address 0 to be allocated. Though I think using MAP_FIXED is overkill, will bring much unnecessary complexity on both kernel and beignet side. I don't mind if people can provide stable MAP_FIXED patches to resolve this problem a few months or years

Re: [Intel-gfx] [Beignet] Preventing zero GPU virtual address allocation

2015-03-06 Thread Chris Wilson
On Fri, Mar 06, 2015 at 02:11:18AM +, Zou, Nanhai wrote: > I don't understand why we need a complex solution when there is already a > simple solution with patch. > What is the drawback of reserving page 0? > Before we going to that complex solution, could we just reserve page zero? > It is si

Re: [Intel-gfx] [Beignet] Preventing zero GPU virtual address allocation

2015-03-05 Thread Zou, Nanhai
I don't understand why we need a complex solution when there is already a simple solution with patch. What is the drawback of reserving page 0? Before we going to that complex solution, could we just reserve page zero? It is simple and straight forward. Thanks Zou Nanhai > -Original Message-