Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1880630ybi; Mon, 1 Jul 2019 02:03:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqzbxXf6pixwcPvIwwjD3G4RvkmhHXlePbyNTFrAc9P9Y1tqmu4KArgaY1z09w6LTxFR8V8s X-Received: by 2002:a17:90a:1aa4:: with SMTP id p33mr30277790pjp.27.1561971837559; Mon, 01 Jul 2019 02:03:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561971837; cv=none; d=google.com; s=arc-20160816; b=ZxZP+hFnKlm0cODzEgUN1dB0ijXnBtsIbp92xHFQkA0Oq//ziastNXO1GkpIQ4HKaG Q0be12PTPnSVkB/DRb/kC+YwxSqm4yptaXvm2l9+dAbl1IrKeAmFuSk5lZrhpURyvRaz wpyI5HFLRWR0uDGJWXP9sFXRmxHsiRY3PgG7YDfa31axU5EVp21a561j1pVXjhtWXGHq R+I7oGLdvR16vM/i3WdVC872XYdf43QhM+n/pSr3dKu06kP3xNkp9H+5kSu1ObaXeCJy R0VSLeOSd8C5O3AcfUlKYL9B84LUDEuODjpOf7psqcNf3GA1ThHno9DLg/TsLBIi/kV3 W7wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=4Jz5LEA2XCY8WxB7ahvqb8ZAK22nsgzGKs1ifY5Dk/U=; b=ZB7erhxZeu/C8tIV0URd98Ns4Z8WpxCnZdAmyufnPUs1CdWjcSJc24TedHImGOKYDa M4bmZnUNxVbGwB6A6HK4xDQ3nGWUNCB1hbquJvmUZ+gxytXXYHmDHMlHiMlAUlQmiIWd CPNCjJwxEnMOi0oyYU+pyxMs5WmW25T4uh0nRRHRoIIB4puPIPy2pw9Iu7NWyA4rMNSY gkwr0ZX2Ohe2r1KwP7AowD15SPyQApc1BQ33IZzErL6wnU+1r7wP4vjiRdwxcw0BIGcL VjGpG6vwwsJLVg/r9ScE3zYsLFToMmWZDMw2ttSgIsOf/duXW8bu8654vQWkATH9YDHi hiUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uJbtVUbZ; 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=QUARANTINE 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 k25si10519525pgb.36.2019.07.01.02.03.41; Mon, 01 Jul 2019 02:03:57 -0700 (PDT) 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=uJbtVUbZ; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728247AbfGAJBA (ORCPT + 99 others); Mon, 1 Jul 2019 05:01:00 -0400 Received: from mail-vs1-f66.google.com ([209.85.217.66]:35693 "EHLO mail-vs1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728196AbfGAJBA (ORCPT ); Mon, 1 Jul 2019 05:01:00 -0400 Received: by mail-vs1-f66.google.com with SMTP id u124so8415192vsu.2 for ; Mon, 01 Jul 2019 02:00:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4Jz5LEA2XCY8WxB7ahvqb8ZAK22nsgzGKs1ifY5Dk/U=; b=uJbtVUbZumTe4WM+B5cBl49oqWTtQjEH1u5VqEXDSDXX5Gae0YkHMB3/FHyIhOfkMK E6fG2kzSVK9HvQbalX/EN5hrDp1UMlKPv2MDUx+TQgiOzC1Af0Vad4VceJ0E0FEgrzFq bLCCiWjgdu/5m+2knBRyCgP88VTZ3Dy5pkruJGDPwcAYJrtlxM42m70Jz8UhznvVEUQ+ bAUdFmTxWFajg2OYnjPYWdKancO2oe6zm7fNmRV6axzmHWmMpE9/kHpS/yKpk0FnJ11K t0tSuHU0qGXrsdAM5QKYN+cV0Xl7dhOM0pu4UvghNeybg1LWu/OiVUB6HIGsKspHeUi0 AY2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4Jz5LEA2XCY8WxB7ahvqb8ZAK22nsgzGKs1ifY5Dk/U=; b=sLjmqSvOwKFrWy/5CT/o03hfAX4POPB7OKpXHjxcJzH4u0i8KyqHB2wQXAIzkIj9pT PiYKgc8Ssyp18OWse6k/284+sgmajLnhwvB5yCM9Z0Io55WzTyEVoES67PF9/yWW67rj Lyi9eSvvbmGtdjGQkwbsEbXPkJBXVqwqhK8qdlF+4rrjQrkAycMQ5WkmALcwZARALQRT TaOYyBlb4RNjWhkJCkl/kexuH0v9sWusCIK+tkG4yInfpEX4cc2AFLivittkjCvSVFc9 c/lvvCLmJcYFLLjSMQA4FXN+SoEy7SXxyNZ6cRrY2Jf5W/i/XCYGCu/ZjaLKxcW0/5Ja W2ng== X-Gm-Message-State: APjAAAUYONknrC/+DX+eHwKZrRpOwAYQk2fXnYLDG4yFSaZXyMBLH13R aR4Zzelk/JsUGh0xcxPo76aZkunONI8sCOm174vn5oUo X-Received: by 2002:a67:d410:: with SMTP id c16mr14718423vsj.61.1561971659065; Mon, 01 Jul 2019 02:00:59 -0700 (PDT) MIME-Version: 1.0 References: <20190701083604.24528-1-ttayar@habana.ai> In-Reply-To: <20190701083604.24528-1-ttayar@habana.ai> From: Oded Gabbay Date: Mon, 1 Jul 2019 12:00:32 +0300 Message-ID: Subject: Re: [PATCH 1/2] habanalabs: Add debugfs node for engines status To: Tomer Tayar Cc: "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 1, 2019 at 11:36 AM Tomer Tayar wrote: > > Command submissions sent to the device are composed of command buffers > which are targeted to different device engines, like DMA and compute > entities. When a command submission gets stuck, knowing in which engine > the stuck is, is crucial for debugging. > This patch adds a debugfs node that exports this information, by > displaying the engines' various registers that assemble their idle/busy > status. If this is a new node, then you are missing the update to Documentation/debugfs-driver-habanalabs > > The information retrieval is based on the is_device_idle ASIC function. > The printout in this function, of the first detected busy engine, is > removed because it becomes redundant in the presence of the more > elaborated info of the new debugfs node. > > The patch also updates the device idle check: > - Add reading the DMA core status register, because it is possible that > QMAN has finished its work but the DMA itself is still running. > - Remove the MME shadow status check, as the MME ARCH status register > includes the status of all MME shadows. This seems better to separate into a different patch. So I suggest first a patch that fixes the device idle check and then this patch (that adds the debugfs node and uses the idle check function). Thanks, Oded