Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7190083rdb; Wed, 3 Jan 2024 07:28:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IEI7FtTEeI8a5rCI8CXk9XBQhqDA9mwlJchvvom1yuBkn+QmoxogrjIYKkwrw7XVwKpxOV9 X-Received: by 2002:a17:902:d289:b0:1d4:13c5:b9dd with SMTP id t9-20020a170902d28900b001d413c5b9ddmr1224096plc.34.1704295733855; Wed, 03 Jan 2024 07:28:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704295733; cv=none; d=google.com; s=arc-20160816; b=Ef9PCu0qTUneve+cOpamSNQNN55Psn5yP3Gm/A74VFh1I1UI1fyeBhtB11aHCuzaZC RsIxepKtJ4gWRpKIWCU4ooyKJQE0XsY4Pwt63myjMBjTeYY5G+GDVXu7tcoK/o+Se0Xq ZIW4jARWcWX5lH95icrVaKCkDqjEUA08q+mmSppuyta+4PFgxU35gmJ0Lo7ufgxj/mqN 1zuzAFAC/3vtsC1WLZNN5pGdOM+cYmpu5P56Bi8NsIKqn9yg+eU6RYafhBaU7eYmD1CB l5ui7L3AB8h2VdTXOiSCsW3J+CV5LRZb8sYPpHI0SnIQZgHynqdWN67efo663P5DjbLx bFew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=Nu8lunzViOUpOfegZsY+Z05a/poHdYSCSroiiueke/4=; fh=o/mM73s54MHq2Gzft13c3ZNC9t62+NaPw2D27FT1i/4=; b=AG9vgA+0ehwXqssNnl3HXEVeiKOUKLWfzh+1Ljcr/RI3DlVWp7edHxLj8foDblzu6E iBU2tQG3jOSYi+YDDUjFK2toF3hoMhHMM1fwGoFHbJ3MtIXQJBfKe4i9IHHig0iH0Ra9 mijzxgs4LkaWkr3+1K70CDiDTjLtK1nV+8FOQV0k7xDd56L0BynFS0zcbDp0HfReGLHF +CTiy3545jPxjkGpZPZgwhg/ccDSkGebTADC+qWKbJ9BZ6IQzMOgdp02xvq7mQ+laUB1 z2Y0fN6prz+i01F3iimvZlO0rhjD0lZ4n6x+Pns2BC6f5RCxolH54CgBVNeqdwXnwqgv XSSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=BBz2ctHS; spf=pass (google.com: domain of linux-kernel+bounces-15700-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15700-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d7-20020a170902cec700b001d3d9d36a46si13137413plg.474.2024.01.03.07.28.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 07:28:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-15700-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=BBz2ctHS; spf=pass (google.com: domain of linux-kernel+bounces-15700-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15700-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 7F577283966 for ; Wed, 3 Jan 2024 15:28:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B2DCA1B27A; Wed, 3 Jan 2024 15:28:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="BBz2ctHS" X-Original-To: linux-kernel@vger.kernel.org Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8ACFF1A730; Wed, 3 Jan 2024 15:28:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 403DlAVu001467; Wed, 3 Jan 2024 15:27:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=Nu8lunzViOUpOfegZsY+Z05a/poHdYSCSroiiueke/4=; b=BB z2ctHSJD5dquHTYRfOF1AtFzzDiAGhOtvEXPnoGkGSSys0dg3J2a1lkPCqOVLCQ2 cpXHWWf9EJEcP7zO7SNQGvCXsFgWJF1xSYmjfV0xhUogTTxrM9VyeyZeC2LSJdwd ZPR/8gnpoDdbEFb03FMC602ms+bbciRyAMd71Tk3NhNEHTvjFIZhoovyx48GL8Ho mnMSZsJ2ieM+nP54aTQMzoCzkkjoq89m9b2gdA0oM9phOslVmEScO0sn3fREyUGo kcYlpiqA4pVUne7jfLzmCm7WaOg6TXhgWe6muJDeaItueS9pNeFlWn9GCTbzhsnP SXlf9BvoRZnzQGxyNDgA== Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vd8dpr8pe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 03 Jan 2024 15:27:46 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 403FRiTq029569 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 3 Jan 2024 15:27:44 GMT Received: from [10.216.8.10] (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Wed, 3 Jan 2024 07:27:33 -0800 Message-ID: <520e377d-e990-c185-4a20-07806873e506@quicinc.com> Date: Wed, 3 Jan 2024 20:57:13 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: RESEND: Re: [Patch v6 03/12] docs: qcom: Add qualcomm minidump guide Content-Language: en-US To: Ruipeng Qi CC: , , , , , , , , , , , , , , , , , , , , , , , , , , References: <1700864395-1479-4-git-send-email-quic_mojha@quicinc.com> <20231225135542.1789-1-ruipengqi7@gmail.com> From: Mukesh Ojha In-Reply-To: <20231225135542.1789-1-ruipengqi7@gmail.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: Eq10y8K3OI3Kx2Zzds3mwvzzBPYT1-u_ X-Proofpoint-ORIG-GUID: Eq10y8K3OI3Kx2Zzds3mwvzzBPYT1-u_ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_01,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 priorityscore=1501 phishscore=0 impostorscore=0 spamscore=0 lowpriorityscore=0 mlxscore=0 malwarescore=0 mlxlogscore=826 adultscore=0 clxscore=1011 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2401030127 On 12/25/2023 7:25 PM, Ruipeng Qi wrote: > <+How a kernel client driver can register region with minidump > <+------------------------------------------------------------ > <+ > <+Client driver can use ``qcom_minidump_region_register`` API's to register > <+and ``qcom_minidump_region_unregister`` to unregister their region from > <+minidump driver. > <+ > <+Client needs to fill their region by filling ``qcom_minidump_region`` > <+structure object which consists of the region name, region's virtual > <+and physical address and its size. > > Hi, Mukesh, wish you a good holiday :) Hope you had the same..:-) > > I have the following idea, please help me to assess whether this can be > implemented or not. As we all know, most of the kernel objects are > allocated by the slab sub-system.I wonder if we can dump all memory > keeped by the slab sub-system? If so, we got most of the kernel objects > which will be helpful to fix problems when we run with system issues. > > How can we do this? From the description above, I think we should > register one region for each slab, for each slab will have some pages, > and the memory between each slab is non-continuous. As we all > know, there are millions of slabs in the system, so if we dump slabs > in this way, it will introduce a heavy overhead. > > I am not very familiar with qualcomm minidump, maybe my thought > is wrong. Looking forward to your reply! In the current state and in simple terms, Qualcomm Minidump can not do this, Minidump is more of a consumer driver so, what ever gets registered with it, it can dump. Qualcomm Minidump serves bigger purpose to dump content in any kind of crash whether it is kernel or non-kernel like NOC errors/XPUs etc and both kernel/non-kernel entity can register to it, so we gets dump in any kind of system crash. One more thing, kernel part of minidump, we are calling it APSS Minidump has limitation of no of entries so it will be difficult to dump non-continuous regions after a certain number of registration ~200. However, we do have a solution in downstream kernel for it like to create a big CMA buffer and register this buffer with Minidump so that whatever gets dumped in that buffer gets captured during crash and fill up this buffer and create elf during panic. I think, similar thing you are also doing with your OS-minidump. I have just glanced into your implementation of OS-minidump, it more of relying on basic concept of RAM content preserved across boot and later reading it through procfs but this basic stuff is common to pstore(ram) as well and pstore has file system support why don't you make your driver as one of pstore record and that way Qualcomm minidump also gets benefited where entire OS-minidump record gets registered with Qualcomm minidump and we get this on panic and you get this via pstorefs. -Mukesh > > Best Regards > Ruipeng