From patchwork Tue Aug 31 06:25:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Imran Khan X-Patchwork-Id: 12466507 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=-11.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS,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 ECFEAC4320A for ; Tue, 31 Aug 2021 06:25:58 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 751B260525 for ; Tue, 31 Aug 2021 06:25:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 751B260525 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id D5CDD6B0071; Tue, 31 Aug 2021 02:25:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D0C596B0072; Tue, 31 Aug 2021 02:25:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BAC858D0001; Tue, 31 Aug 2021 02:25:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0172.hostedemail.com [216.40.44.172]) by kanga.kvack.org (Postfix) with ESMTP id AA7106B0071 for ; Tue, 31 Aug 2021 02:25:57 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 1EF6A274B5 for ; Tue, 31 Aug 2021 06:25:57 +0000 (UTC) X-FDA: 78534390354.14.6019C32 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf20.hostedemail.com (Postfix) with ESMTP id AC75DD0000A7 for ; Tue, 31 Aug 2021 06:25:56 +0000 (UTC) Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 17V5b6Ch004368; Tue, 31 Aug 2021 06:25:56 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : content-transfer-encoding : content-type : mime-version; s=corp-2021-07-09; bh=5DNVaJf/8L6u4QMscZdhaGYs7ZfbidalGQX8dqsTCrQ=; b=cU2btWh9BsPA0MzwHUXtiqg4DYFaoyxMx+j/8CNJlw/26UCOWBE1hXyQnMomw10I3OQb GDPAQryW/LuLruVQ5gQcBW2WRoXD/mCAmiIbwnnFCVAjBNlid3sb/iBm5V0czwkmsUTC TWyZGK+Oz88C0haqnIuxqoLdbpcyR4nsr/QzNKEYzRgGn2YwTC8s+oRK+KDiHw2q49ns DtMHdgHMVlUiBdkLbdIfWgekRoB/Ry9nSP8IHPF78eGUfxvK3vscUYJH9Kyq1XIPV+S1 OO/0f++oVRW720aNJ1ZwdMD94m6Y6KMUT4xFwTOgzQkTzWG5+StUjybVnXk9G6dRumSb Rw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : content-transfer-encoding : content-type : mime-version; s=corp-2020-01-29; bh=5DNVaJf/8L6u4QMscZdhaGYs7ZfbidalGQX8dqsTCrQ=; b=gjGbK9UA98zKcGuBolh28l5KzOw/WDIFh9AW5L+NJ1e6bojsSjAMJQAqsEzGfASVZE3Y b6leGTR7EUmDXlB5PbnalU4vce9AH9miqvD3yXVY6GOEIfr6er/k0WHNGYz94ODLjzjc VfWJYY+kUc8aoKhXgELanuoHX1dvDNZN6k7rqBQt9jv67J/B/n+L521aAw3FRqp91+Vp cnmlcxuT5cecHvVrGWXH4Ehju2gHRXiEzvvH9RyJ7PyUU1YgOI5agJUqhv2VGR0V3L6q A8dAVdVdjxm6G84qT1Q0GKmk/+FI1b0HyWbv4Ifo9HV4KjHQ0cJBtWz0/n1GbinxxWz+ Rg== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by mx0b-00069f02.pphosted.com with ESMTP id 3aseedg3ar-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 31 Aug 2021 06:25:55 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 17V6FaZO119024; Tue, 31 Aug 2021 06:25:55 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2048.outbound.protection.outlook.com [104.47.66.48]) by aserp3020.oracle.com with ESMTP id 3aqcy4599g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 31 Aug 2021 06:25:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CJT41Oydk0QNFZ7FwzoPTxlCQQUV4BxUO0NqEZY3zcGBUYvGjXGeU2j/zLXbDwluwA3ilxDxHazuWmKhB5uSU29Owo8h6CSjlHTBVBR5qFvA4ZlzX0JSYs7BTNHCnZiV7ja5PXlapFxwzjGPO94648oNaW8Q0s4hbWSinmVC5fV6/IgeSs7s6ZefogBOdTxdqUUwAPGg2IAjNHNo85NS6qn+xFDtX9rmb/9DRR0XK5FeMejCu71DAjqjr1CMH8VQcanJhiwujptFsj2QURq53xcyr9qUAJjkwxxYFInCd3tMHZQ3jB5fUzUCv66ub0aZrMOsL6OxxAxyQm5D5Uwpng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5DNVaJf/8L6u4QMscZdhaGYs7ZfbidalGQX8dqsTCrQ=; b=FQ98253YM43UF6mqRhXJ4XmtqfyQId0bfdhqs0N0fr59X1dO+6qyjT/IyAQszaOoEtmXdZrhyTN3GRW4PGaC4BGt0ekfGafTzkAnFc9GVpDbx6ODY69dPFS2yfKAOAAaW3hPGFiAsW2UHoPLEteFpo3yGUKg9CmM7CxpKDanB0J2779tm6rseccQkNPJ64KPMhhoeqtD91C08q7SRwWalb7R9D8bsSIxxfB0QAteNfCii7XPxpNZTImbYrpaePfOFnXDkaTLJ7zu1MZSllxQtvTdTyS515l6RImtuYv+dlSW2PLU8MPEKDMqSbf7EXs8+OPP8Z3UH3iqi0yWiXLGgg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5DNVaJf/8L6u4QMscZdhaGYs7ZfbidalGQX8dqsTCrQ=; b=anw0GtTCZCC8MLT57BUrNhAM7qYtJHyTcNqZ10HRaWiVKFZHbQN4bsaxQK3k+zRxlpr3JIIDuCitlUPCggO+Q+tcAGhW1HEENQAfsc0+eZj5cbeKhvsRUR7x+MCpBohfKvXFdi3BeEVYo64bhgGoha3cDYBHnKYBTnMjearroZA= Received: from CO1PR10MB4468.namprd10.prod.outlook.com (2603:10b6:303:6c::24) by MWHPR10MB1999.namprd10.prod.outlook.com (2603:10b6:300:10a::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.23; Tue, 31 Aug 2021 06:25:53 +0000 Received: from CO1PR10MB4468.namprd10.prod.outlook.com ([fe80::c8e:2147:b83f:79db]) by CO1PR10MB4468.namprd10.prod.outlook.com ([fe80::c8e:2147:b83f:79db%8]) with mapi id 15.20.4457.024; Tue, 31 Aug 2021 06:25:53 +0000 From: Imran Khan To: cl@linux.com, akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 0/2] mm, slub: Use stackdepot to store user information for slub object Date: Tue, 31 Aug 2021 16:25:37 +1000 Message-Id: <20210831062539.898293-1-imran.f.khan@oracle.com> X-Mailer: git-send-email 2.30.2 X-ClientProxiedBy: SYCPR01CA0009.ausprd01.prod.outlook.com (2603:10c6:10:31::21) To CO1PR10MB4468.namprd10.prod.outlook.com (2603:10b6:303:6c::24) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (110.33.47.182) by SYCPR01CA0009.ausprd01.prod.outlook.com (2603:10c6:10:31::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.19 via Frontend Transport; Tue, 31 Aug 2021 06:25:51 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 79ed6b32-9495-4cba-61b0-08d96c482eb6 X-MS-TrafficTypeDiagnostic: MWHPR10MB1999: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LpiS8/hJu2DRgkDfbZdKpvlEM8wx77mBEQ6eIy0/eixQicLRGKals0SeF7emqgkGaGBywNXtvuYdKwpzoMicf3zB501NArf79w5NEDqSmsVn6DV9YsWqWaJK21QE131qSDbw8MBK6FLUoFbgkxxfgcsOZCc7PuSPXGxhndmkxT8BD57SBcEN7Ej70oziReXQTp3mFilIdhGRQ1ekPQl+AcbEjM1SdZvpKH5fwRFfAB5IK6WwUpzfwy3bHXP8PdAek5mgyL9p1wwgHrpTvS462jMqFEJZtX+9+/BuhZlOY5knRloUHy8x1c30p4Kcju/nPvldx1rE/MhiJgHqauH/GORke17AzkggZ0bdMyvzZGvdBHB3AJl8QJ8FjyF18ceukvyZtzX0UgUlm1wARDIdffPge1EUcszMFtM1QWsDy1Aaotc3F9AZ4sPU3Nil5OaST9YWT/yjE1hZTTRFoXJh389K/5W/LorwoV8EpRBxSjcinrtKPjCojbYdKE6/Cs65V9xoYONd95UYbnTFNqvQ/5xcjm8Ih3bGgKfoluLvXyY4RE9V4Wvu7EgGXb2tPg8jIZOLac+jqViEpE+lg4RY7ErVlpcEUHBbmjqugxTuG80U3nNU92mmmeZHJpDXqLiqRhQRaa0gzgAn0txeSyFMS7t/Eq/EhzbEuLSmALm+c9aUe4zteZ9g3M8lsC95Nn3JR4I5q2wRPkOWMTi0iRFIvg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO1PR10MB4468.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(376002)(39860400002)(396003)(136003)(366004)(346002)(2906002)(956004)(316002)(86362001)(2616005)(5660300002)(66946007)(83380400001)(36756003)(1076003)(4326008)(6666004)(66556008)(66476007)(8936002)(6506007)(6486002)(52116002)(38100700002)(38350700002)(8676002)(26005)(186003)(478600001)(6512007)(103116003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: xZDPErg8hXshvL7LDfadXqyFaDRNX10Y8HRqVBszwE+9UwJN0vtZAINQVPoYWeJ/TyjsvFb+zKPFsN09Iq5UGTFGiOlux+15Rq+x5xhrCWDvMHux8R9nwVRTtLZll25UqrlYqx7LgcdNvyMzg2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xSJOpIBva2Cspxdf6lFbKcbaFsPM05sVH44xsbg9XeoQ8Vsb1FTmn8UMwYDaw17nbRLalpKeJySK/46+4eSTXX2QFO9v2WIAMMXwcdjN X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 79ed6b32-9495-4cba-61b0-08d96c482eb6 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4468.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Aug 2021 06:25:52.9722 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: WOxl1rBrggD18YAVuMKw7dClvecdJxbe+irIug2ot7VK2Xl787ZhTdngGfbQx50UPRB4o+GoAOGKWuM2W881xQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB1999 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10092 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=8 suspectscore=0 phishscore=0 mlxscore=0 malwarescore=0 mlxlogscore=964 bulkscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2107140000 definitions=main-2108310036 X-Proofpoint-ORIG-GUID: WzSvupPnN4kRaguejU5h3v8Q9KKussH2 X-Proofpoint-GUID: WzSvupPnN4kRaguejU5h3v8Q9KKussH2 X-Rspamd-Queue-Id: AC75DD0000A7 Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2021-07-09 header.b=cU2btWh9; dkim=pass header.d=oracle.com header.s=corp-2020-01-29 header.b=gjGbK9UA; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=anw0GtTC; dmarc=pass (policy=none) header.from=oracle.com; spf=none (imf20.hostedemail.com: domain of imran.f.khan@oracle.com has no SPF policy when checking 205.220.177.32) smtp.mailfrom=imran.f.khan@oracle.com X-Rspamd-Server: rspam01 X-Stat-Signature: nywuw3epajhxyhoqwoi4ejua939c1uu7 X-HE-Tag: 1630391156-239064 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000008, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: This series of patches proposes use of STACKDEPOT to store user (SLAB_STORE_USER) information of a slub object. As stack traces corresponding to each unique allocation and freeing context can be saved and retrieved from STACKDEPOT, we can reduce size of each object (~256 bytes) and hence save memory without losing any information. *PATCH-1: Makes STACKDEPOT explicitly configurable, so that it can be enabled for storing allocation/freeing stack traces. *PATCH-2: Uses STACKDEPOT to store allocation/freeing context for a slub object. I have marked this series as RFC, so that I can get feedback about this change, because this change just involves debugging framework and does not add any value to production scenarios. Imran Khan (2): lib, stackdepot: Add input prompt for STACKDEPOT option. mm, slub: Use stackdepot to store user information for slub object. lib/Kconfig | 3 +- mm/slub.c | 87 +++++++++++++++++++++++++++++------------------------ 2 files changed, 50 insertions(+), 40 deletions(-)