Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp4137212pxy; Mon, 26 Apr 2021 19:44:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz05thS835YJjA78M8TmkSwzJmPYa+P78d8PvV/XBzAS6UFdVITzSPkqEbrr3nU4GC3/7hL X-Received: by 2002:a65:4986:: with SMTP id r6mr20127046pgs.392.1619491498768; Mon, 26 Apr 2021 19:44:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619491498; cv=none; d=google.com; s=arc-20160816; b=VR4C4osgwHChooz1OS2rWkzV7f6NHYlwWrKKH3iG5HxdQICjbzDDM3PZcYxGVO1OMD 1/bs6EDMP3KZDX743iwIlnKr0l1+5dS63dzgfCrruwrx4QRR/I/TaIPl1Gdudttfxyea PQww6VHN3vksBGiYS5+cESPqERLHlIEOS3r8aCnSvtCpKSPxUHbnQlgNpHKKNgdcgvaF YpRA5M/s7/jRXVTUqO3ng8fuYRg2E4jxYwpISzSaSBmOEc9xA934J+gIwz3QCNA/NOcP hnDXMPQ8m1/EHP1pSV/R0zgEVxb3G4B32arE4L18FkoIEEDRlmdk1sjVcj0VwgNbjN91 esgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=zwZm+iDbKecQVi47Pk7oEQ5PMltYN64tGoJ4C40Spps=; b=UsEjuNYoFU8NGwbnqDZOwW1hETPtoN6MuqkOeJG8BwQatuX6r2zeotefLm3yPRj06W m56NTfUICqtQjytBKO8xgVPnVGnEKPP0sJcWM5Xn0KJPLXCAFKXXDNoMHypLxI6HsbjA bsmArWjVsWfTUt2OXTp3QD9FEbBFICn9ZrVjmMHptH+oaz13AgegdwcBOhtZ9N7+/dRZ qKs7R6NW6iMzmecYIzJKYZniyZ+z0b+swnTcMBSMaZDGsn1LyCRBRnKiWPwURuRyRI48 Jd1rcV0iaKYSS4n6eIvm/q69TWDuJL3a05lFX8AjxgvZ5S1/CSXZc5HUiRUBLjpugVHn bluQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@me.com header.s=1a1hai header.b=y7fF6x2D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=me.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l20si1572770plb.311.2021.04.26.19.44.46; Mon, 26 Apr 2021 19:44:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@me.com header.s=1a1hai header.b=y7fF6x2D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=me.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233989AbhD0Co0 (ORCPT + 99 others); Mon, 26 Apr 2021 22:44:26 -0400 Received: from pv50p00im-ztdg10022001.me.com ([17.58.6.58]:59640 "EHLO pv50p00im-ztdg10022001.me.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232295AbhD0CoZ (ORCPT ); Mon, 26 Apr 2021 22:44:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1619491422; bh=zwZm+iDbKecQVi47Pk7oEQ5PMltYN64tGoJ4C40Spps=; h=From:To:Subject:Date:Message-Id; b=y7fF6x2Ddk9Ziiqxq8/0R6k1SW8AMir95ovaql+t/AhtGr+7FosEBYny+8xnjU0qO ozNWHwivXpGfHLYB+Hjl3Ozoryxf2cW1FQpOO4BfJGXLQm1koYxBT16qGrEd0bDL+j hEFV6VTtYQZapVV9UNxor9l9kcG4Wd4oP79qqreqW9vxeA3LQzQlDgBUulGvRFxMB+ 03leRsbDZLRYYHWZ5dTXqo3n1Had5I3qL6H5tTGQ3vYgVR+CkLOUeIi4uP/zgSgIPL 1Lygy2VShxX1eJ3e/vh9jQM3US9IudTfn4h2CKogaefXz9g1N1klmmyEg2PNBkFWh4 16WzRT/77lrIg== Received: from pek-xsong2-d1.wrs.com (unknown [60.247.85.82]) by pv50p00im-ztdg10022001.me.com (Postfix) with ESMTPSA id AD486A03F9; Tue, 27 Apr 2021 02:43:37 +0000 (UTC) From: Xiongwei Song To: cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, vbabka@suse.cz Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Xiongwei Song Subject: [PATCH] mm: append __GFP_COMP flag for trace_malloc Date: Tue, 27 Apr 2021 10:43:20 +0800 Message-Id: <1619491400-1904-1-git-send-email-sxwjean@me.com> X-Mailer: git-send-email 2.7.4 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.761 definitions=2021-04-27_01:2021-04-26,2021-04-27 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 mlxscore=0 mlxlogscore=388 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2009150000 definitions=main-2104270017 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xiongwei Song When calling kmalloc_order, the flags should include __GFP_COMP here, so that trace_malloc can trace the precise flags. Signed-off-by: Xiongwei Song --- mm/slab_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/slab_common.c b/mm/slab_common.c index 585a6f9..c23e1e8 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c @@ -928,7 +928,7 @@ EXPORT_SYMBOL(kmalloc_order); void *kmalloc_order_trace(size_t size, gfp_t flags, unsigned int order) { void *ret = kmalloc_order(size, flags, order); - trace_kmalloc(_RET_IP_, ret, size, PAGE_SIZE << order, flags); + trace_kmalloc(_RET_IP_, ret, size, PAGE_SIZE << order, flags | __GFP_COMP); return ret; } EXPORT_SYMBOL(kmalloc_order_trace); -- 2.7.4