Received: by 10.223.164.202 with SMTP id h10csp4301739wrb; Wed, 29 Nov 2017 04:20:47 -0800 (PST) X-Google-Smtp-Source: AGs4zMa7NL2UqrztVz2yXGq7kB2yd8pwBSdAFklPA5Vbjhf7p4oUrIEAe1JQJQj63SSmEtJ6xSXU X-Received: by 10.98.8.210 with SMTP id 79mr2844350pfi.204.1511958047794; Wed, 29 Nov 2017 04:20:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511958047; cv=none; d=google.com; s=arc-20160816; b=mkUNIi23WA0n/1Dr73CmaGuqtlh/kttjP1yyB/+85/SnTF4y5uKGTiO5gpDqHNB7Pq fIk3N0YUk+HdnU78cgtqgighwdm6gJoaQD+ZP+4alx6MeECZOdrBvnl4ZlnJG4OyfkbM 7kaFL1k2LFUllQKhDNJizk3INcGdu7cpXzZVjAgHgYh6O+TJFqtBNcBwpKFtJYHi7Vyg pnOS/JW6+xNJJ25pMdgryOWGL3gosOWCXlbUYS+aXgfP+jFtIvNHJr592hEy3PAwMIwE aiArSnjOLV99NvAplJbBAzQ4ueTt5w2a28bi2jzAdXgTm1V7mgqyxCu9Fx55ReADZPV8 aqlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=udeX+LN99pUf6kHOeOaVqfQUnTesgJvloeRW9a9Wazc=; b=kImwfAwB9VLHHKU7KzDNmHTLGOuEStPmB9Jh/PA7yyOdlyGAk8QiZ0tb4UEOQjUgts 0qqTzrHUZtrnsS1VfWh5CCMj7Ewp8Tw2NVcFhWJfPEdOlCuJRKZbn/0BJ8gIfPUd2gXY A4BKNkt7bttkYXZxYKEOZ8EhgfpLaDqVmSqwLzvJCdSL5FHGHjiY5Tk/wzEt8Jx6YRPC l5d00rxviKH1jfXxzNomjgl/bllMUKPeDpr5xi0rOCOeRg/5VMBEbrlQoCuAUKkw4T9Q vIcqKEDq/hiKsbHkfGo6xb9Fb+PBNFxOkjfyKIT4m9mHpbK5k/INw7TFemCFaWDJCxxD esjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sl+vFG+N; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a12si1302283pfl.63.2017.11.29.04.20.37; Wed, 29 Nov 2017 04:20:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sl+vFG+N; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932564AbdK2MSK (ORCPT + 70 others); Wed, 29 Nov 2017 07:18:10 -0500 Received: from mail-lf0-f44.google.com ([209.85.215.44]:34453 "EHLO mail-lf0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753466AbdK2MSF (ORCPT ); Wed, 29 Nov 2017 07:18:05 -0500 Received: by mail-lf0-f44.google.com with SMTP id x20so3648417lff.1; Wed, 29 Nov 2017 04:18:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=udeX+LN99pUf6kHOeOaVqfQUnTesgJvloeRW9a9Wazc=; b=sl+vFG+N/wdtUfBUyw3E7mK+TPdsjqX+V4gEtEiljC5c7HyDn9XUl1IW8sYxzR5gGq 3fbNOMUBFj29IpoKFmHy9geo8YgbozFdBwDU38oQdIJ7vth/J9I19zL2+V0uMTMn1bUt 5uGWHplxxnCXzR7zNI3OadNTHUWo+jCpcyl0gCoYInHup+Z2Bh2RozgUxYtoDyZCLUL6 F3DfIWIBql6LGsqsDkBEIDhXEHgXJ84w62CWD2jgCzS4O5moPE3l7WmNV9ztkWG6EWzH iWjT6U8GIrESag+3XrGnzu/bk/V/JX5UN+KM+kK4DbJRWMcPHU1byINtreDuEY053j3l TRuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=udeX+LN99pUf6kHOeOaVqfQUnTesgJvloeRW9a9Wazc=; b=JinuRJq6kEhtXw9SQWVVWo8lm5KUinJ8QyZVX5DbwqqeFrrt7oz1agfmkOPmvTFWAn WAAEY3DyU71DQOCeyTm2Gh0mJhw5+YQ47QdEA1Hw+LQBf6G/GpjKaGJ7Iwyl7BFcfwVX CgWe7q0tAQvn1KR9St+XM7u+N+0G3PhxvBzrYtjM+f2JFKcFs8ZOJeVUjC57irvE2q/H 1L7Q2MY7hV8D8TlEl/0KGEbYmseJAtDT5taBI71B8vYKSmVsrw3UIRa2hHa3phjnDPmX 5uikq1soST+rHZBuIoM7ak5KV/1MZ2ildjFpQ2fU9TcRFaR+FLKJIkNpf4Bvr7Rs+RT1 0XIQ== X-Gm-Message-State: AJaThX4A7FLsNzPzFDCAd6nfxnJqHYxuQW5AWSuVDAMPbnCwtiBIJ3O0 e9nJOJDLoRFyO6QIDup9CX9Hxnu4 X-Received: by 10.46.27.85 with SMTP id b82mr1316298ljb.163.1511957883750; Wed, 29 Nov 2017 04:18:03 -0800 (PST) Received: from [192.168.1.145] (ppp109-252-91-204.pppoe.spdop.ru. [109.252.91.204]) by smtp.googlemail.com with ESMTPSA id q27sm272592lfd.55.2017.11.29.04.18.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Nov 2017 04:18:03 -0800 (PST) Subject: Re: [PATCH 10/10] gpu: host1x: Optionally block when acquiring channel To: Mikko Perttunen , Mikko Perttunen , thierry.reding@gmail.com, jonathanh@nvidia.com Cc: dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org References: <20171105110118.15142-1-mperttunen@nvidia.com> <20171105110118.15142-11-mperttunen@nvidia.com> <9c5676eb-ba6f-c187-29e4-7b331bd3962f@gmail.com> <38340901-7016-3444-5ace-64159b32f1c7@kapsi.fi> <1b35ec93-167b-3436-0ff2-5e2e0886aea7@gmail.com> <775a2536-b225-2d96-3954-7efab6bc5c3e@gmail.com> <794b713e-e4f9-0b71-d9eb-168d002ab6a2@kapsi.fi> From: Dmitry Osipenko Message-ID: <07e28b40-dd2b-774f-2d07-3b5d6cf08c46@gmail.com> Date: Wed, 29 Nov 2017 15:18:02 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <794b713e-e4f9-0b71-d9eb-168d002ab6a2@kapsi.fi> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29.11.2017 12:10, Mikko Perttunen wrote: > On 12.11.2017 13:23, Dmitry Osipenko wrote: >> On 11.11.2017 00:15, Dmitry Osipenko wrote: >>> On 07.11.2017 18:29, Dmitry Osipenko wrote: >>>> On 07.11.2017 16:11, Mikko Perttunen wrote: >>>>> On 05.11.2017 19:14, Dmitry Osipenko wrote: >>>>>> On 05.11.2017 14:01, Mikko Perttunen wrote: >>>>>>> Add an option to host1x_channel_request to interruptibly wait for a >>>>>>> free channel. This allows IOCTLs that acquire a channel to block >>>>>>> the userspace. >>>>>>> >>>>>> >>>>>> Wouldn't it be more optimal to request channel and block after job's pining, >>>>>> when all patching and checks are completed? Note that right now we have >>>>>> locking >>>>>> around submission in DRM, which I suppose should go away by making locking >>>>>> fine >>>>>> grained. >>>>> >>>>> That would be possible, but I don't think it should matter much since >>>>> contention >>>>> here should not be the common case. >>>>> >>>>>> >>>>>> Or maybe it would be more optimal to just iterate over channels, like I >>>>>> suggested before [0]? >>>>> >>>>> Somehow I hadn't noticed this before, but this would break the invariant of >>>>> having one client/class per channel. >>>>> >>>> >>>> Yes, currently there is a weak relation of channel and clients device, but >>>> seems >>>> channels device is only used for printing dev_* messages and device could be >>>> borrowed from the channels job. I don't see any real point of hardwiring >>>> channel >>>> to a specific device or client. >>> >>> Although, it won't work with syncpoint assignment to channel. >> >> On the other hand.. it should work if one syncpoint could be assigned to >> multiple channels, couldn't it? > > A syncpoint can only be mapped to a single channel, so unfortunately this won't > work. Okay, in DRM we are requesting syncpoint on channels 'open' and syncpoint assignment happens on jobs submission. So firstly submitted job will assign syncpoint to the first channel and second job would re-assign syncpoint to a second channel while first job is still in-progress, how is it going to work? From 1583859247255486449@xxx Sun Nov 12 11:24:44 +0000 2017 X-GM-THRID: 1583223808868552366 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread