Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755513Ab3JHOpz (ORCPT ); Tue, 8 Oct 2013 10:45:55 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:38843 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752390Ab3JHOpr (ORCPT ); Tue, 8 Oct 2013 10:45:47 -0400 Message-ID: <52541A95.4040107@canonical.com> Date: Tue, 08 Oct 2013 16:45:41 +0200 From: Maarten Lankhorst User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: Jerome Glisse CC: Thomas Hellstrom , Alex Deucher , Peter Zijlstra , Daniel Vetter , intel-gfx , Linux Kernel Mailing List , dri-devel , Thomas Gleixner , Ingo Molnar Subject: Re: [RFC PATCH] drm/radeon: fixup locking inversion between mmap_sem and reservations References: <20130912150645.GZ31370@twins.programming.kicks-ass.net> <5231E18D.7070306@canonical.com> <5231EF5A.7010901@vmware.com> <52323734.4070908@canonical.com> <5232A39B.5040205@vmware.com> <52541350.5060807@canonical.com> <20131008143354.GA2355@gmail.com> In-Reply-To: <20131008143354.GA2355@gmail.com> X-Enigmail-Version: 1.5.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1126 Lines: 24 op 08-10-13 16:33, Jerome Glisse schreef: > On Tue, Oct 08, 2013 at 04:14:40PM +0200, Maarten Lankhorst wrote: >> Allocate and copy all kernel memory before doing reservations. This prevents a locking >> inversion between mmap_sem and reservation_class, and allows us to drop the trylocking >> in ttm_bo_vm_fault without upsetting lockdep. >> >> Signed-off-by: Maarten Lankhorst > I would say NAK. Current code only allocate temporary page in AGP case. > So AGP case is userspace -> temp page -> cs checker -> radeon ib. > > Non AGP is directly memcpy to radeon IB. > > Your patch allocate memory memcpy userspace to it and it will then be > memcpy to IB. Which means you introduce an extra memcpy in the process > not something we want. > Can we move up the call to radeon_ib_get then to be done before calling radeon_cs_parser_relocs? ~Maarten -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/