Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1873499ybi; Wed, 17 Jul 2019 23:31:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqytf9gtTaBRMJvC2n9HDvidQTtHb5gT7lO0vEdd92vsGCzRo4pWztrPbeT//Zu3QxagAagU X-Received: by 2002:a17:902:ac85:: with SMTP id h5mr48745242plr.198.1563431517194; Wed, 17 Jul 2019 23:31:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563431517; cv=none; d=google.com; s=arc-20160816; b=N+StolE8VitUNnxsGKTBe3MTRoNYNA7nFq3ImsoSMfzcLcTSDPRXQxZfuLzg65G86f wtTiYQhwtYeWtM/JAMAqnvAq+qpuzEM9J++TbCU+ajA2BWOGPZkJstqdqK5C400zLYlI iDG+fhVcwZQ2Ii3ywdeuYL5TFhwmdt/QfXheSv6w7VyL9Ot98/EmJLjxALOf+X3f3F1s 44/MQHIQsq6bBpbmvgj1y3j2/PeZ9AnYLz1d/cudX9UEcT6bP2heiBfMOI+cp2flGaum Me/zn+I5ag4/JsVkXUR0UcIRefIz8wA2YPnN24/LtIdu8Pj+VwnOOlu80Yti3kDq1HC2 yQ5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=O71ReyyfIMfn6gxA/QsNgwUZ9rVFehQHxeS9W6xMfvs=; b=uC+Ax68MKsG9H0VZ4Fw23x0kYTUtp5VKYF8lu264njOaV8UjE0e5jn8fvB1VosnNB3 f7WzVbXAmG3gEmNp2fQ6cWqNVGi3whTiIVKcWV3jNOL37b88xeMKBIHRS45G4l5axoFG m8HAtXCHavR8/pGG5pGmK4kAWUlwXlTe6pvvVYlMVk4aqTIjofmdnrqqSk417b1bqdG+ cRii3YgDwtRq+qiwfsmseYDYTZ9K6iRvGzm2qbc65/yI/TaI6+wz30EzMKmp3OOYGSUd IgQyDnYKC77XP7whbZEAl7G+kH82WtA1rbGp6WTFMPtB0WhKOByd0wylwfgvjSKS6oxF Ue+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=u7YukDqU; 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 cb13si24349422plb.325.2019.07.17.23.31.40; Wed, 17 Jul 2019 23:31: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=u7YukDqU; 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 S1727131AbfGRG37 (ORCPT + 99 others); Thu, 18 Jul 2019 02:29:59 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:50912 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726383AbfGRG37 (ORCPT ); Thu, 18 Jul 2019 02:29:59 -0400 Received: by mail-wm1-f66.google.com with SMTP id v15so24341529wml.0 for ; Wed, 17 Jul 2019 23:29:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=O71ReyyfIMfn6gxA/QsNgwUZ9rVFehQHxeS9W6xMfvs=; b=u7YukDqUKNSf05PsuG432+7ZzVHtctSbBxgs7A42q4ShY2iRLXdXd4JTXqNWOTtMeP kUW7EgqSYqjCwXiAKScdrNS1oCYMKBo6QpnpWn/5xbiasC9fLfE4Ves3isetbmF8P14V KWpn6yb0B5G0s+QHTE4jmdTr4o1Wi0Jghi0+hExjetoDhxrYU88RUZOu0t+JD70f0N1f daYbeaAhyozbEtLdZknIUrhXnJZi4f4dQhVBq6gM+sh3Z88wpsDbgjKxquBn07nQbNKH 76Myi4dqjVnELRDWYfiIIHuqEebygO3/E1bwwpoiHOBz+nn1pw69VqDak04VLjDmV2HO Liaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=O71ReyyfIMfn6gxA/QsNgwUZ9rVFehQHxeS9W6xMfvs=; b=LJT38qOC4RZ3K2fxn+nydLpdPrLkuJmi/1NubKgzsvCWwqQTHwOs6umTxBUmeptRli jPeNNeAWpDj9wGF6Lc0eUuwsmiQriXAE5JocALAET/VBLzvNNy/Ncpa85YfyLcTzKgrt A/Rh1vmqbAj0wEt9bTYAKp+mPTsEo6qXlb/91Tkl2CGtp3l0woPEZjqV/eA82FXxV5+D 9ODcLjvyrIVia0jM4sEYA49/JAf7TSUn1bY13z03Gaz6eSp93KGLIS3kpSy+ahIRicyz Igi0gdTKJrANwj9ZzGD2QriKvIUMlCKmAiokVTfyYSzDin8r8OIS7wbYjIgNF2SnQtaM XTQQ== X-Gm-Message-State: APjAAAWfDRolPJMmQka79/cSPG8cpxLkQBJ8XT2ASSbay2koe6xYquLC H3z36ATQE+t7OfYTfT+QUPaP+HUj X-Received: by 2002:a1c:f418:: with SMTP id z24mr40020220wma.80.1563431396966; Wed, 17 Jul 2019 23:29:56 -0700 (PDT) Received: from ogabbay-VM.habana-labs.com ([31.154.190.6]) by smtp.gmail.com with ESMTPSA id j189sm27721368wmb.48.2019.07.17.23.29.55 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 17 Jul 2019 23:29:56 -0700 (PDT) From: Oded Gabbay To: linux-kernel@vger.kernel.org, oshpigelman@habana.ai, ttayar@habana.ai Cc: gregkh@linuxfoundation.org Subject: [PATCH] habanalabs: add debug print when rejecting CS Date: Thu, 18 Jul 2019 09:29:54 +0300 Message-Id: <20190718062954.15283-1-oded.gabbay@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When rejecting CS because of too many in-flight CS, print a debug message about it as it useful to know when the user is debugging (it indicates a back-pressure from the driver as the device is not fast enough to consume the CS) Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/command_submission.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/misc/habanalabs/command_submission.c b/drivers/misc/habanalabs/command_submission.c index 6ad83d5ef4b0..f4e2c2ad0057 100644 --- a/drivers/misc/habanalabs/command_submission.c +++ b/drivers/misc/habanalabs/command_submission.c @@ -305,6 +305,8 @@ static int allocate_cs(struct hl_device *hdev, struct hl_ctx *ctx, other = ctx->cs_pending[fence->cs_seq & (HL_MAX_PENDING_CS - 1)]; if ((other) && (!dma_fence_is_signaled(other))) { spin_unlock(&ctx->cs_lock); + dev_dbg(hdev->dev, + "Rejecting CS because of too many in-flights CS\n"); rc = -EAGAIN; goto free_fence; } -- 2.17.1