From patchwork Tue Feb 9 14:24:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georgi Djakov X-Patchwork-Id: 12078309 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1766C433E0 for ; Tue, 9 Feb 2021 14:24:19 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5A7C764E6C for ; Tue, 9 Feb 2021 14:24:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5A7C764E6C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 84BD86B0005; Tue, 9 Feb 2021 09:24:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7FC926B006C; Tue, 9 Feb 2021 09:24:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6C4E86B006E; Tue, 9 Feb 2021 09:24:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0129.hostedemail.com [216.40.44.129]) by kanga.kvack.org (Postfix) with ESMTP id 583E06B0005 for ; Tue, 9 Feb 2021 09:24:18 -0500 (EST) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 1ED7B181D209E for ; Tue, 9 Feb 2021 14:24:18 +0000 (UTC) X-FDA: 77798949396.06.stage37_5e074cc27608 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin06.hostedemail.com (Postfix) with ESMTP id 082041003C075 for ; Tue, 9 Feb 2021 14:24:18 +0000 (UTC) X-HE-Tag: stage37_5e074cc27608 X-Filterd-Recvd-Size: 3836 Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by imf02.hostedemail.com (Postfix) with ESMTP for ; Tue, 9 Feb 2021 14:24:17 +0000 (UTC) Received: by mail-wr1-f50.google.com with SMTP id n6so9225433wrv.8 for ; Tue, 09 Feb 2021 06:24:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=eQeLU31ef47viRxJ/MC8VCOG0n3wDTVZ859Id6VOzf0=; b=vKlRIaIqFNihmUDRVjhW/1tv/8nuKp2WibgJVIBrSOS26wXmuPrRKByZ5XHuqfhplB RRmqy6QTzL0WJsgLQyrao5ntq2BJt0tuyYxfT8Fimh6VLHAKXaW3zZcydzfv1jtNZPeC 6rnoUqGiY6Dyf7Qx/qEBOkZDhA4+gh2e1kAyA8fIIprsQRD1ih0QHSlTP3sFOEcV2YI9 LJ028UzHos6OIyIUnGFEWl5AlkvRDqZHgrYozYWLIU6w/OTT2jQemaeFVEapTxy82BPz KQRdVE2J7rJfCjiliSVjdnmNofzF5fc9r5w1lSoHnV12NmD7f4awachW4C/xhdE+jn2i 8CIw== 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:mime-version :content-transfer-encoding; bh=eQeLU31ef47viRxJ/MC8VCOG0n3wDTVZ859Id6VOzf0=; b=fyiltHqiqrc1ItEssT8z7Sz3jBjS20j9NE3yd8VA8xis8frWdgGUMwR2wr/gECNRkb L/BIciPH9i0SiSk9M28Qp6NQJtCfMmyG3G5V9UqE8ppDoUOjLPus5ZGO3RrYwtmF9GPF KuSOWdL9aLaIywH7O4h14XyBFPkc/MarZT7b/KMHsWIsxO1/ruEm6OoMpZm26uKkrgXk AxLuMKII8gdoQZmCzsPuIf0s7tCqhROVd8wmeU+JrEqX5RqyoP0nFzdwh57aUWtypODw EdD0K1K6AVYVwHe6MT7SKBc6Td/9i4tFhLSfuZ7lt5VcazYAkGStHs8jBIMS1EBZQ28G H0+Q== X-Gm-Message-State: AOAM533VFjQpRuYu7QcSMpVILn3W30fAO0Sv/27m5xHS6CLdnziNONVj QF1hvutbTI9b2k84yR271/K/nQ== X-Google-Smtp-Source: ABdhPJwUC45k1V/bVJws3QQirQ/TyTfmMBrmtO4nCoh85QFEZaWSsSzWEH9ThvccG1oBnlbd7RXqPg== X-Received: by 2002:a5d:460e:: with SMTP id t14mr26534825wrq.68.1612880656154; Tue, 09 Feb 2021 06:24:16 -0800 (PST) Received: from localhost.localdomain ([212.45.67.2]) by smtp.googlemail.com with ESMTPSA id r13sm5423108wmh.9.2021.02.09.06.24.14 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Feb 2021 06:24:15 -0800 (PST) From: Georgi Djakov To: akpm@linux-foundation.org, linux-mm@kvack.org Cc: rdunlap@infradead.org, pdaly@codeaurora.org, georgi.djakov@linaro.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] mm: cma: Print region name on failure Date: Tue, 9 Feb 2021 16:24:14 +0200 Message-Id: <20210209142414.12768-1-georgi.djakov@linaro.org> X-Mailer: git-send-email 2.29.0 MIME-Version: 1.0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Patrick Daly Print the name of the CMA region for convenience. This is useful information to have when cma_alloc() fails. Signed-off-by: Patrick Daly Signed-off-by: Georgi Djakov Acked-by: Minchan Kim Reviewed-by: David Hildenbrand Reviewed-by: Randy Dunlap --- v2: * Print the "count" variable, as it was originally in the code. (Randy) * Fix spelling s/convienience/convenience/ in the commit text (Randy) v1: https://lore.kernel.org/r/20210208115200.20286-1-georgi.djakov@linaro.org/ mm/cma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/cma.c b/mm/cma.c index 23d4a97c834a..54eee2119822 100644 --- a/mm/cma.c +++ b/mm/cma.c @@ -500,8 +500,8 @@ struct page *cma_alloc(struct cma *cma, size_t count, unsigned int align, } if (ret && !no_warn) { - pr_err("%s: alloc failed, req-size: %zu pages, ret: %d\n", - __func__, count, ret); + pr_err("%s: %s: alloc failed, req-size: %zu pages, ret: %d\n", + __func__, cma->name, count, ret); cma_debug_show_areas(cma); }