From patchwork Wed Aug 10 17:28:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charan Teja Kalla X-Patchwork-Id: 12940842 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A0E7EC00140 for ; Wed, 10 Aug 2022 17:28:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 380E36B0071; Wed, 10 Aug 2022 13:28:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 32EF58E0001; Wed, 10 Aug 2022 13:28:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1D05D6B0073; Wed, 10 Aug 2022 13:28:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 0DAFD6B0071 for ; Wed, 10 Aug 2022 13:28:50 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id CFB821614A6 for ; Wed, 10 Aug 2022 17:28:49 +0000 (UTC) X-FDA: 79784367978.07.4C8A359 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by imf04.hostedemail.com (Postfix) with ESMTP id 2243940031 for ; Wed, 10 Aug 2022 17:28:48 +0000 (UTC) Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27AEN9Cf028793; Wed, 10 Aug 2022 17:28:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=qcppdkim1; bh=pHnYNDIbIxbTXRPWSMIXGubce2vdDoCOAC23ha+lTRU=; b=BA4r2+cPOI5TRvWmgxFuCI6FY9EB3mZSrPmCI3nDO3wJFhNPMCbH6B1BieK02/IuuFPC Wy+uQpOSR11NEjdCGF/iwg9TM3YhakcLoystNrXq00QfagOLUwBuTPqbusjA+OsKsENJ YA4MRqFhoqCzAViq3H+kBv66dBLp0I4AfXODJlJ9Ti3QmdygdOyqWdrESkXkivLVJHzy QzKxWfWHPiVXsw/clDoQmrF4NQtceFVsoXqeIyPxzztPM/hKl1pyaDQh2iiK8qUj7baO iJwexdUO/j9Gj21ayJmoo/QJ5/bfmvcAcJCpnOBuBRMsbpi8DSxkBsu6caQI0YwuO6oC 3Q== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3huwr5k995-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 10 Aug 2022 17:28:46 +0000 Received: from pps.filterd (NALASPPMTA05.qualcomm.com [127.0.0.1]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 27AHQFF8026674; Wed, 10 Aug 2022 17:28:45 GMT Received: from pps.reinject (localhost [127.0.0.1]) by NALASPPMTA05.qualcomm.com (PPS) with ESMTPS id 3hshck5yr5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 10 Aug 2022 17:28:45 +0000 Received: from NALASPPMTA05.qualcomm.com (NALASPPMTA05.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 27AHSiWa030570; Wed, 10 Aug 2022 17:28:45 GMT Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.47.97.222]) by NALASPPMTA05.qualcomm.com (PPS) with ESMTPS id 27AHSi98030569 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 10 Aug 2022 17:28:44 +0000 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Wed, 10 Aug 2022 10:28:44 -0700 Received: from hu-charante-hyd.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Wed, 10 Aug 2022 10:28:41 -0700 From: Charan Teja Kalla To: , , , , CC: , , Charan Teja Kalla Subject: [PATCH] mm/cma_debug: show complete cma name in debugfs directories Date: Wed, 10 Aug 2022 22:58:05 +0530 Message-ID: <1660152485-17684-1-git-send-email-quic_charante@quicinc.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: 5nMOJ4Gi2L-no8AreXv6h5wjT_i7xW1J X-Proofpoint-ORIG-GUID: 5nMOJ4Gi2L-no8AreXv6h5wjT_i7xW1J X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-10_11,2022-08-10_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 phishscore=0 impostorscore=0 mlxscore=0 adultscore=0 mlxlogscore=611 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208100053 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1660152529; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=pHnYNDIbIxbTXRPWSMIXGubce2vdDoCOAC23ha+lTRU=; b=wFxLOjOvVMlskxAlcSINPQnp7lAtA+x6G2MUJZw4lirdW7WBy+gXucQnet6V9k0G/4CAYD msHvtIEZektoVpR2v7Nxqfc7zrT8yFyfXnaXDEw8T8q+TFWZxFIJk6JeY01E3D3jj8VQ5B rNSaqt0lHREx1yvZ8+nkY6abk8INTWs= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b=BA4r2+cP; dmarc=pass (policy=none) header.from=quicinc.com; spf=pass (imf04.hostedemail.com: domain of quic_charante@quicinc.com designates 205.220.180.131 as permitted sender) smtp.mailfrom=quic_charante@quicinc.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1660152529; a=rsa-sha256; cv=none; b=x/87YpVBzuBXfDVS+fDsgh/hRiwNpYSGHMLeDLNdvQ4ZnRiCrsMoyz7Jx9ref0y+lEBN/C SZgDULfhTIhMu1yPq4vJMln1ltCWcUxSj39eh8NPs31HIx47/IOVTTMY7Z1dIewMFXd+2B kWrceKbySpMMSIBAyvCH9oP31kjJlTI= X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 2243940031 X-Rspam-User: X-Stat-Signature: whknygcgepdm87atk65q3yfq7oy96oyd Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b=BA4r2+cP; dmarc=pass (policy=none) header.from=quicinc.com; spf=pass (imf04.hostedemail.com: domain of quic_charante@quicinc.com designates 205.220.180.131 as permitted sender) smtp.mailfrom=quic_charante@quicinc.com X-HE-Tag: 1660152528-16194 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: Currently only 12 characters of the cma name is being used as the debug directories where as the cma name can be of length CMA_MAX_NAME(=64) characters. One side problem with this is having 2 cma's with first common 12 characters would end up in trying to create directories with same name and fails with -EEXIST thus can limit cma debug functionality. Also drop 'cma-' prefix for the cma debug directories as they are clearly evident that they are for cma debug through creating them in /sys/kernel/debug/cma/ path. Signed-off-by: Charan Teja Kalla --- mm/cma_debug.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mm/cma_debug.c b/mm/cma_debug.c index 2e77049..602fff8 100644 --- a/mm/cma_debug.c +++ b/mm/cma_debug.c @@ -163,11 +163,8 @@ DEFINE_DEBUGFS_ATTRIBUTE(cma_alloc_fops, NULL, cma_alloc_write, "%llu\n"); static void cma_debugfs_add_one(struct cma *cma, struct dentry *root_dentry) { struct dentry *tmp; - char name[16]; - scnprintf(name, sizeof(name), "cma-%s", cma->name); - - tmp = debugfs_create_dir(name, root_dentry); + tmp = debugfs_create_dir(cma->name, root_dentry); debugfs_create_file("alloc", 0200, tmp, cma, &cma_alloc_fops); debugfs_create_file("free", 0200, tmp, cma, &cma_free_fops);