From mboxrd@z Thu Jan 1 00:00:00 1970 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 98150C25B08 for ; Wed, 17 Aug 2022 06:47:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E4B7F6B0073; Wed, 17 Aug 2022 02:47:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DD44C8D0001; Wed, 17 Aug 2022 02:47:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C4D286B0075; Wed, 17 Aug 2022 02:47:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id B15A76B0073 for ; Wed, 17 Aug 2022 02:47:31 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 7A4841C5DD3 for ; Wed, 17 Aug 2022 06:47:31 +0000 (UTC) X-FDA: 79808153502.08.7F5C0F8 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by imf25.hostedemail.com (Postfix) with ESMTP id C334FA0088 for ; Wed, 17 Aug 2022 06:47:29 +0000 (UTC) Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27H1T9GX022177; Wed, 17 Aug 2022 06:47:28 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=vOuxriRt907sajIb3LTQUHlA9Y/Omm5ol4lH6AscHAM=; b=EIkjUzUDs3C3y0YB1vhz2nyvLFl7SH7ZxqvuH1PdaFsyRjnl3NsW8+WnETaaHXS2YZzZ LJVXtNP92MJnwEjoY1Xxed0xQU/SA+VAKJAIEDshjvaYQQC57CrWa9JYE6HuXhMMBvgk YjjBG6rdM3b0TFwagmx6cYxutWPfdoteZrIzjaPBxx4oX7bxP8qeDXf4oe/IDroB3bYx MX6oRqGtvv0qSyfgCspev65CN0NwRSkvD3eOc4Kco87vmSe8fK03W87ty0h0+IGZ7BdG hqucSB/rr9IUcbQihN3QuGZXfu7OYSafuW4v5iZYi00ZOTEUJaTYUHQgMy5ZgNAmSdrU Vg== Received: from nasanppmta02.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3j058t51kd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 17 Aug 2022 06:47:28 +0000 Received: from nasanex01a.na.qualcomm.com ([10.52.223.231]) by NASANPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 27H6lRIL000930 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 17 Aug 2022 06:47:27 GMT Received: from [10.214.67.15] (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Tue, 16 Aug 2022 23:47:25 -0700 Message-ID: <1326361c-44c3-d2e0-c7a9-1e4b3e84ab6e@quicinc.com> Date: Wed, 17 Aug 2022 12:17:22 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.1.2 Subject: Re: [PATCH v2] mm: oom_kill: add trace logs in process_mrelease() system call Content-Language: en-US To: Andrew Morton CC: , , , References: <20220816060017.17996-1-pbrahma@qti.qualcomm.com> <20220816173556.cb493d6a85edd65e1fa52911@linux-foundation.org> From: Pratyush Brahma In-Reply-To: <20220816173556.cb493d6a85edd65e1fa52911@linux-foundation.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01a.na.qualcomm.com (10.52.223.231) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: rC0XQY3xHC-GvHK-5eP0AyMRYmEVKN0w X-Proofpoint-GUID: rC0XQY3xHC-GvHK-5eP0AyMRYmEVKN0w 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-17_04,2022-08-16_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 priorityscore=1501 bulkscore=0 lowpriorityscore=0 clxscore=1011 phishscore=0 mlxscore=0 spamscore=0 impostorscore=0 mlxlogscore=730 suspectscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208170027 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1660718850; a=rsa-sha256; cv=none; b=0MMnxzmLTgS7mCiFPhcJsFx1e4f6eX+jU41fg+hGFM2A4SUlDCowALInzPSflWMX1WQegn Au7EUakNPVEzMnZgknq+9sL6nXqFKu2z0MkoGiHEbj5N5FnWyOgStj+xoECfaG7U8vkbQF 4hnMFDJxfdcxy9eWEnJSWYFxUuW9S7w= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b=EIkjUzUD; spf=pass (imf25.hostedemail.com: domain of quic_pbrahma@quicinc.com designates 205.220.168.131 as permitted sender) smtp.mailfrom=quic_pbrahma@quicinc.com; dmarc=pass (policy=none) header.from=quicinc.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1660718850; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=vOuxriRt907sajIb3LTQUHlA9Y/Omm5ol4lH6AscHAM=; b=KOZuAuF35VOlBv0FhXBo6Xl32EEjLEkyQUL78hYzoIAYguvyoOGXCF4THGF+ynfH1O+2Gc S4+HGKzQfLIg1Hu0pXS+IICpwplPWYaPFusubpAjtQDHtL00gvF3voklkx9fiRdC+e0Gjy +7r8y0KOQ+m4Amh/aDJsma4FJnGKabU= Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b=EIkjUzUD; spf=pass (imf25.hostedemail.com: domain of quic_pbrahma@quicinc.com designates 205.220.168.131 as permitted sender) smtp.mailfrom=quic_pbrahma@quicinc.com; dmarc=pass (policy=none) header.from=quicinc.com X-Rspam-User: X-Stat-Signature: 1df16s5nob6i5d9f87w1ou5xepti5zt4 X-Rspamd-Queue-Id: C334FA0088 X-Rspamd-Server: rspam06 X-HE-Tag: 1660718849-432081 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: On 17-08-2022 06:05, Andrew Morton wrote: > On Tue, 16 Aug 2022 11:30:17 +0530 Pratyush Brahma wrote: > >> The process_mrelease() system call[1] is used to release the memory of >> a dying process from the context of the caller, which is similar to and >> uses the functions of the oom reaper logic. There exists trace logs for >> a process when reaped by the oom reaper. Just extend the same to when >> done by the process_mrelease() system call. > Why? Please describe in full detail the end-user value of this change. This patch provides information on how much memory is freed from a process which is being reaped. Adding trace events in the process_mrelease() path when process is being reaped would enable more holistic debug as it happens in oom_reap_task_mm() currently. This extends the debug functionality for the events as described in [1] to the process_mrelease() system call. Now the coverage of trace events is complete. [1] https://lore.kernel.org/all/20170530185231.GA13412@castle/T/#u