WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Re: [Patch RFC] ttm: nouveau accelerated on Xen pv-ops

To: Joanna Rutkowska <joanna@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [Patch RFC] ttm: nouveau accelerated on Xen pv-ops kernel
From: Arvind R <arvino55@xxxxxxxxx>
Date: Tue, 30 Mar 2010 11:20:45 +0530
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Pekka Paalanen <pq@xxxxxx>
Delivery-date: Mon, 29 Mar 2010 22:51:28 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=DuUKYvGJ2zawGcBudeaa3vnJGAEVtLPjQf8kIc5zwGo=; b=LfFOA8HO4RcVQNHSwpQvN+mZcM1+yu8quetPfAWqyarSAfB9lBBk/UZpuhLnaguehg CkrLbQXczhzzdmPwW19MV7WepS6gT0458eWaWbRfcDE+2BZWktQh/yQ70CSbKxwsTare BTv7DNkIhbdc38uDPeEVWN4P4NHe0HSOfWzfE=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Qb4HSY5Oaxwx4Qmy3AOnQJNBWE+foGep/jxBgWj+/fak4PT6SEaIn9BPYUpMRvNI8R beR7Q8TnkB9SKlXxuoXvb4tR6RWFWVY3MB15LZPltuJQ/RAnjFajso2iRu4P7on8nK58 REu3yX9ronGTlox2H73IgXZNrAbmNtN1B/xHw=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4BAF2D5D.3030605@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <d799c4761003100521h663c82eepda85f3f0309828c2@xxxxxxxxxxxxxx> <20100311130258.49dc04bd@farn> <d799c4761003112127o29b76177r9fbbaf4ddc8e644@xxxxxxxxxxxxxx> <4BAF2D5D.3030605@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Sun, Mar 28, 2010 at 3:50 PM, Joanna Rutkowska
<joanna@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> On 03/12/2010 06:27 AM, Arvind R wrote:
>> On Thu, Mar 11, 2010 at 4:32 PM, Pekka Paalanen <pq@xxxxxx> wrote:
>>> I'm adding dri-devel@ to CC, since this suggested patch touches TTM
>>> code, and none of the Nouveau code. TTM patches go via dri-devel@.
>>>
>>> Thanks.
>>>
>>>
>>> On Wed, 10 Mar 2010 18:51:21 +0530 Arvind R <arvino55@xxxxxxxxx>
>>> wrote:
>>>
>>>> Hi, Following is a simple patch that is needed in nouveau to get
>>>> accelerated X on a Xen dom0 pv_ops kernel. The kernel is
>>>> jeremy's 2.6.31.6 as of 20100222. The whole gpu tree of nouveau
>>>> (which is almost the mainline merge), was substituted into the
>>>> kernel-tree. All components of X (mesa, Xorg-server-7.5,
>>>> xf86-nouveau, libdrm) used of the same day.
>>>>
>>>> Patch: diff -Naur
>>>> nouveau-kernel.orig/drivers/gpu/drm/ttm/ttm_bo_vm.c
>>>> nouveau-kernel.new/drivers/gpu/drm/ttm/ttm_bo_vm.c ---
>>>> nouveau-kernel.orig/drivers/gpu/drm/ttm/ttm_bo_vm.c 2010-01-27
>>>> 10:19:28.000000000 +0530 +++
>>>> nouveau-kernel.new/drivers/gpu/drm/ttm/ttm_bo_vm.c  2010-03-10
>>>> 17:28:59.000000000 +0530 @@ -271,7 +271,10 @@ */
>>>>
>>>> vma->vm_private_data = bo; -       vma->vm_flags |= VM_RESERVED |
>>>> VM_IO | VM_MIXEDMAP | VM_DONTEXPAND; +       vma->vm_flags |=
>>>> VM_RESERVED | VM_MIXEDMAP | VM_DONTEXPAND; +       if
>>>> (!((bo->mem.placement & TTM_PL_MASK_MEM) & TTM_PL_FLAG_TT)) +
>>>> vma->vm_flags |= VM_IO; +       vma->vm_page_prot =
>>>> vma_get_vm_prot(vma->vm_flags); return 0; out_unref:
>>>> ttm_bo_unref(&bo);
>>>>
>> Sorry for the typo: in the last added line,
>> vma_get_vm_prot(vma->vm_flags) should be
>> vma->vm_get_page_prot(vma->vm_flags)
>>
> Arvind,
>
> I've just tried your patch (with the above correction applied). I tried
> it against the latest pvops0 kernel from xen/stable-2.6.32.x with
> back-ported nouveau code. Xen 3.4.3-rc4 hypervisor. The actual kernel is
> based on Fedora 2.6.32.10.x kernel SRPM, more specifically on the
> Michael Young's SRPM (that integrates pvops patches):
>
> http://fedorapeople.org/~myoung/dom0/src/kernel-2.6.32.10-1.2.92.xendom0.fc12.src.rpm
>
> With your patch I can get my nouveau X driver now working *without*
> NoAccel or ShadowFB settings in the xorg.conf, which was not possible
> before.
>
> I have enabled desktop composition using XRender in KDE (that runs in
> Dom0), but I see a very high "latency" in how e.g. Windows react to me
> wanting to move them on screen, or before the KDE's "Strat" menu
> appears, or when I activate the "Expose effect" (Ctrl-F8), etc. It looks
> like if the composition buffers were still kept in host memory and
> transferred to the video memory only when I want to do something with an
> object (e.g. move the window). So, e.g. after this delay at the
> beginning (e.g. after pressing Ctrl-F8) I can get smooth graphics
> effects (e.g. Expose effect), but this initial delay, that manifests
> itself before pretty much any action I take, makes the system
> practically unusable... I'm using the latest KDE 4.4.
>
> I've been wondering if you, or any other of xen-devel readers, have:
> 1) Tried the patch with some composting X Window manager in Dom0?

using ecomp (compiz port for enlightenment) on e17-git. Enabled composite.
Works with software-engine but not with xrender-engine.

> 2) Got similar results?

Works fine - no latencies I can notice - though I've tried only the default
effects settings

The sluggish/jerky keyboard/mouse in domU (SDL) consoles have also
vanished with accel-enabled X. Keypress-repeat does not work in domU.

> FWIW, when I enable ShadowFB in xorg.conf the effect no longer occurs.
> But ShadowFB disables H/W acceleration, so even though I can get rid of
> the "latency", I'm not getting smooth visual effects anymore (no smooth
> Expose effect :(
>
> Thanks,
> joanna.
>
> BTW, this is the patch I used for the recent pvops0 xen/stable-2.6.32.x:
>
> diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c
> b/drivers/gpu/drm/ttm/ttm_bo_vm.c
> index 3dc8d6b..0f57125 100644
> --- a/drivers/gpu/drm/ttm/ttm_bo_vm.c
> +++ b/drivers/gpu/drm/ttm/ttm_bo_vm.c
> @@ -271,7 +271,9 @@ int ttm_bo_mmap(struct file *filp, struct
> vm_area_struct *vma,
>         */
>
>        vma->vm_private_data = bo;
> -       vma->vm_flags |= VM_RESERVED | VM_IO | VM_MIXEDMAP | VM_DONTEXPAND;
> +    vma->vm_flags |= VM_RESERVED | VM_MIXEDMAP | VM_DONTEXPAND;
> +    if (!((bo->mem.placement & TTM_PL_MASK_MEM) & TTM_PL_FLAG_TT))
> +        vma->vm_flags |= VM_IO;
>        vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
>        return 0;
>  out_unref:
>
>

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel