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 EC982C636D7 for ; Tue, 21 Feb 2023 16:13:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6A10E6B0071; Tue, 21 Feb 2023 11:13:24 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 629786B0072; Tue, 21 Feb 2023 11:13:24 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 47B6B6B0073; Tue, 21 Feb 2023 11:13:24 -0500 (EST) 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 2E2F56B0071 for ; Tue, 21 Feb 2023 11:13:24 -0500 (EST) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id F1013120111 for ; Tue, 21 Feb 2023 16:13:23 +0000 (UTC) X-FDA: 80491793886.16.CEB8FEC Received: from smtp2.axis.com (smtp2.axis.com [195.60.68.18]) by imf08.hostedemail.com (Postfix) with ESMTP id 98309160013 for ; Tue, 21 Feb 2023 16:13:19 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=axis.com header.s=axis-central1 header.b=Nhvsmlr9; dkim=pass header.d=axis365.onmicrosoft.com header.s=selector2-axis365-onmicrosoft-com header.b=vnJ6AzZC; dmarc=pass (policy=none) header.from=axis.com; spf=pass (imf08.hostedemail.com: domain of Christopher.Wong@axis.com designates 195.60.68.18 as permitted sender) smtp.mailfrom=Christopher.Wong@axis.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1676996000; 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:in-reply-to:references:references:dkim-signature; bh=KzXM+NualGCLPIIbboRZ4x34s7PaGZAb/cBqXELAl5g=; b=qQcmeHIaXS7J0blnUuhys/Aj81nAA3Pj0SBtm7Sc2a4VwyBowbOxlFpZl8+5bf3qg3RY4k X9020vIJAoyL8s35yz+Pt8QNM3VrPVs0NIwI8Ki28CLBBm70Bc005OzQE8LGHeu31LLnB7 U93M+9pMtpd/h//NS+BG1Of8mboVa2o= ARC-Authentication-Results: i=2; imf08.hostedemail.com; dkim=pass header.d=axis.com header.s=axis-central1 header.b=Nhvsmlr9; dkim=pass header.d=axis365.onmicrosoft.com header.s=selector2-axis365-onmicrosoft-com header.b=vnJ6AzZC; dmarc=pass (policy=none) header.from=axis.com; spf=pass (imf08.hostedemail.com: domain of Christopher.Wong@axis.com designates 195.60.68.18 as permitted sender) smtp.mailfrom=Christopher.Wong@axis.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1676996000; a=rsa-sha256; cv=pass; b=Yb1kdr/MKqJXJas5GXJcuDF9lrL5BCkh17k32t2bX93JAKkibCwqk7uLbSH67wRmBQsXM0 bA5hJaZz15j7ezbmsxX7xMsA73vAKBFzqklnnmFNxcbyFImKPODJ15qdXLycpE7UPKtaaZ 9qGTYGQc8xF6RIHzlSx26EDrpQirzcY= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1676996000; x=1708532000; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version; bh=KzXM+NualGCLPIIbboRZ4x34s7PaGZAb/cBqXELAl5g=; b=Nhvsmlr9yUgpxhzAB1O1eth/dgINJvm1uQX1GWIhtf0zU2BeJNFyxfFX Wcox6niNq3fSWe0/0Px3+P/1ZPcVVlYONj+ylB+0HU+A+DTkSw/1p1j83 MgbkGIFtPi9YPbvECGabm+vftE2qmYIqDjSRtoLbVTTLSgvFdNGNV0dly tIKTXuMgO6iipAF6v0a5uP2U0by2+5LxuLiTlckf0qoW2u6lp3c29qq99 Tpaw1LS+yDGw8DMGTpVUQqNsNHQvxU4Yg17agrerRfuYPHhdAmGrI8NSw ifTcQIxJ44+wu0WvBBXDIh0h/oED+nkaimJ14gxlTzvC6bLwPC3JsWyAs A==; ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eAHTF4EYueXXLLNl1zHKzecuI5TCI+yCQz25wEdIi0JSgihVHgMPkqOAaISlaOIBKaBFrZ1UBq8fuwy8jMgTo9ULTtcT3NdRiT9Hz70ROuXWkqz0Jdi+vXIxC11w7PfwtEx+F640QVG2RbJjXiBcnd1ykdEVMIfLzeGdeSz0D+OS48MuStFXXU80MALbuSgnpX6dnowAUb3qCHkbRzSQxLLfVKq9wXlqtEj+B0JlsXEcj0obaf02avItLOSmc+7945HlKbq0OaJWnOs8HlNOw488/fyDBx/WN+yzhz2S3bXtHEV74xUOV74PIEMplXzblHrM88wCygmkJ992EAgnuw== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=KzXM+NualGCLPIIbboRZ4x34s7PaGZAb/cBqXELAl5g=; b=JvJoGDmWIqyuC5KpxUBCKnvyMzRSsQJY+9gMdIGBV/woZla2sRtQKR29cJ2yejqoLlMY2HN3IdLW7YBpxh6BJA+U8dkN6CSYrk4TU8vEZvu0nyRj85Z2O0W9dubj9KmXXe6hWNKEATRo2Ajsuu9UlRY1vKAPa6dXnM/TnZyFF+T9towFP+t2764eQd6zofrsSaOiz73++2cdncXMi0gQrd/RC3K/4leHwOAkYbwEpwfgCUo3Y4jhclzyaLKgxbv3uco0quEnzTKVth97cBoWcPtvqRgOL7mNWpn2OLZ1o/uJPKVM2aiVLbwscnDETkKADyzg3A1XEpNCYSDRhO8AZA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=axis.com; dmarc=pass action=none header.from=axis.com; dkim=pass header.d=axis.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis365.onmicrosoft.com; s=selector2-axis365-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KzXM+NualGCLPIIbboRZ4x34s7PaGZAb/cBqXELAl5g=; b=vnJ6AzZCF0ipDmkj1stQ4erCZAJ0a7KSUGlle6tp7Fp0Kzoauo1Ew6STY82we8AalSFU6Ddz1OyjrTRK4tOA1tX1+h12xW8F1IepRm3r+xBRtqKejE17xuHckWDG/jEt9PR7jZZGpYqB2ze7ylcc2cY2SOuQMkjvJSjwSxwHShM= From: Christopher Wong To: Michal Hocko , Matthew Chae CC: Johannes Weiner , Roman Gushchin , Shakeel Butt , Andrew Morton , kernel , Muchun Song , "cgroups@vger.kernel.org" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" Subject: Sv: [PATCH] mm/memcontrol: add memory.peak in cgroup root Thread-Topic: [PATCH] mm/memcontrol: add memory.peak in cgroup root Thread-Index: AQHZRgGZmZ1hlMPSSUm0FEzy5/N5KK7ZgGIAgAANoRs= Date: Tue, 21 Feb 2023 16:13:14 +0000 Message-ID: References: <20230221143421.10385-1-matthew.chae@axis.com> In-Reply-To: Accept-Language: sv-SE, en-US Content-Language: sv-SE X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DB4PR02MB9334:EE_|PAVPR02MB9553:EE_ x-ms-office365-filtering-correlation-id: 2226ca64-6d0a-4b88-f6f9-08db1426896a x-ld-processed: 78703d3c-b907-432f-b066-88f7af9ca3af,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: emmdC+1IbEoY/JGkA1BR8wC2aUBhnTj9mMZALe4ofh0+K2OFxbcXmMko+zlujd9JssyYyPywYqqJqAXVmooCWNMIYG4FObVWWbkvh4k3WoVMXfld/zuP7vCv2S7OS7wHEdeWDcEDEPoMPhvD3K9G/HyEJiKrMZTmaNDWIjTVTCayXOingSDe9fHyP0NQwFEqK40qgk5yZJuAiS5IoHQAo4oJNe7wE8Zph6Act3VYO3wx9pPJPOV2IicBxteE431k8Xo+c7WV0hdFufh4QdVrV0g7+7dnwoAtccRGDFzXjntT736ha6V5PceoXjpsT+GPSnlkyCcCJkpti4CSS/blPCjKHsOvNRkbtHnMEnL2PvDWqO08prd9mnUeZMLrR3feyhW04MzzymVfn3G5lBO4FNKR6icIWTFE8Zg3S/qNfTzHruvUi3PEPfF1cUYhq7X+ndQxFdge7QqFtVmwoQbBKHCUJZptDvf+b16zed2PJt7C5ryeN3TtlJ9e53eT2k0mUJaX8wxACfH27W23uEZvCk06liUHpLwmhAuYxSQZR6EOzTXltzM0h+ZsnAadePfX4Lu4PhcRYUbuQS6Spu6ezVVpnTI747wT658WGhO2iai+xisJ53hQ8hKx7o0SkD4i8iqrSBYlY3u2IaHvdHQon3sujCi8l8S2XPBlpXZ1bvRBPbbV54MMLZGgJA54Ovso34a2cKynok8UbdULrf5AkA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB4PR02MB9334.eurprd02.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(136003)(39860400002)(366004)(376002)(346002)(396003)(451199018)(19627405001)(86362001)(38070700005)(33656002)(5660300002)(41300700001)(52536014)(2906002)(8936002)(83380400001)(38100700002)(122000001)(478600001)(66476007)(76116006)(7696005)(66946007)(66556008)(8676002)(71200400001)(6636002)(66446008)(64756008)(54906003)(110136005)(26005)(9686003)(55016003)(186003)(316002)(91956017)(6506007)(4326008)(66574015);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?eylMQAc77QpxRuTa6iz7wXhSCLyvaU5K/LMysYI8vJTYMQesdMyrkVkS9Q?= =?iso-8859-1?Q?YEU1VuNYm3RGCBgP1gWpH7fUJQJSCr5tAceKEwg8pDx9E1n6XIbK8qULsH?= =?iso-8859-1?Q?1E4byVf9KWI014KFTuE1gl8qPO8qK/ZN8L2aKk7HDlVEifQDzWlKkw/Y+M?= =?iso-8859-1?Q?DotDwufNv/20rpZPWMmuzfXCuNMnVxP1yj+oHhnTM0sqqXekcL6Uj97u9Z?= =?iso-8859-1?Q?f7WiRnFQHRyVc2o/1Y6OVj7+lnbyNhwWqy54ojziQLjEu1FkRxxTlpB6Xt?= =?iso-8859-1?Q?o/D8UZR13NYt5mnEjH6Mh5ystMXnTa5qsTZuxjB4WMwJ+EqcQ2zHLdPFcs?= =?iso-8859-1?Q?U7PtNcabH5Pt9Re5XHH7Qr469xNydbxe6capoweATcjBZb/kRtY8IINMc/?= =?iso-8859-1?Q?mkInk/1PjIIfhAx4lmqHQSUyV3WiaU3mly814z10UmWwfCBrFSSXW5v3kk?= =?iso-8859-1?Q?QotKbj8tRhzJ8fzLvgz5GPDfP23iv0b74rgA+GlWQFXJJlZuzNbE41ElC/?= =?iso-8859-1?Q?fobfDZtUeWZlD2bDsBIAG+LXtsm29mkmW1He9a/mTyd3MrSrwP+rgGwt9J?= =?iso-8859-1?Q?Htwft55uniBeHYbEuOUK6szvS9nx8J908YcX6ErcRPx6ndcXxvn1AMjrxF?= =?iso-8859-1?Q?jjodBBLaIe/3s+K/UQ2ri4d85cT8/c7RSBl3uddVRmfvIGjzKcmSKofJuM?= =?iso-8859-1?Q?rcYO4U3WbSGApp+GKJmhPkm9Yl42Le2DLKxatXr79kP2s/1qO18A4vr+gC?= =?iso-8859-1?Q?f0RGXKmzWjYtB39dLJDt+Qv0+6e1aZthddIAGihObF1IANeKn6OdDPvwip?= =?iso-8859-1?Q?T/JJNGpgJYMI7guHDDByHkaa+ZgtXO5pvQ4l2q8PrRlClImT5gMzmjOJGU?= =?iso-8859-1?Q?jSoE0tiibTMoJScdSBKpk5U15zgUes84/ScjBrnQ/v/LyZkylZK91he5vS?= =?iso-8859-1?Q?MTsQoCa5c+lrGeodbaawID5vxwvUPMouHxxmfFb/fIStyrc+DALSH4YGZb?= =?iso-8859-1?Q?Y10V0mW1PcIZFL/YPo1bHAEk2WWMo6qz7q9YLo/sEU5nj4DMk0aCsxFOmC?= =?iso-8859-1?Q?nC36ZklUTFwLaZj/zIFV1ZgVtZsZYV2flffaN2PsYChQgmxcOrJRuYMdHo?= =?iso-8859-1?Q?djY1nMt2To47zhgJFUUPXtr5IjEBQgEL1ozqoHiLa9zONJg5Hv9WnKHkId?= =?iso-8859-1?Q?MWc3Uj6HzyxcbjKbLF+bcF7wk8vzRSkRQBSY4YXzdbCW+lW6RN7ClunoM2?= =?iso-8859-1?Q?OsHB6i9aUEN1BmZ+NgUhnNayZdMG7B142HSV19mD3Vxo8zjjsVLjnN6WOi?= =?iso-8859-1?Q?bpJTu0P635sWcCVMz6s4CwGjcaEr0+i7yCBCXy48vKwqFrRNgIi/as+PlV?= =?iso-8859-1?Q?4985cGK09XQbxeeloX8QP6pUqPlBOnNeom41OGXKKG48udOnJ684GEt5PV?= =?iso-8859-1?Q?hH9i/g3LNylvBDEPZ2vZbLGAuvbeqk0JIFo+fbptkSvaggV0yA05FBW9Ko?= =?iso-8859-1?Q?i1qp6txFzKrCWst7J4fn4ozXtZ0UNLhLAc0w74+leKhKHqWdca7LDtJ6QQ?= =?iso-8859-1?Q?284L4JVS/90DQbOdOLNHSqH3uLraljoi00VlCOObUmZCswMQylCxhLFJme?= =?iso-8859-1?Q?aCCWNnsIhZRTo=3D?= Content-Type: multipart/alternative; boundary="_000_DB4PR02MB93344BAA949FA7E25E298C90FEA59DB4PR02MB9334eurp_" MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DB4PR02MB9334.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2226ca64-6d0a-4b88-f6f9-08db1426896a X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Feb 2023 16:13:14.9377 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 78703d3c-b907-432f-b066-88f7af9ca3af X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 5xZwUMDt53xbIspHTPtpe/6/DGR53I0rDxxzObcDYXldPRNk6mzh3fgfJU6VuHT51Wndq9RnkIOCj918X40vPA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR02MB9553 X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 98309160013 X-Stat-Signature: 7kre5fxbft9mu83tay11noid4yn8efio X-HE-Tag: 1676995999-234474 X-HE-Meta: U2FsdGVkX19nAHmeS9f+G6QS0D1hhZ0BQnwYJshDjozB6okuP8Tmt6K0IH5EB9yx95d5Ldgvt50ZEzLRV7TvVedegwh7389cW9/7MbHUkjoUmVdnJCegEnyyTStD53SJfIs2aDxvMQtLZQst5sI7sEIekru5WkOYem147iZqPZMDhxTfDZpvhqoPa4vj0Z11v13xy0fPxHbqCnw8puYQcRMc3fSzrQfDT5I+tbdxrtw5vhU72G7xRpXq0uR/jVeofyIIDtWNOwRMtrxqhpPIel/Aecyjv/is7BhfhdjApO4PblVuVzOBJqjcltc6YdXfVFrNyGU+JOFLEd/L3LghoT7Ym5o9kYWgBpt2igoZPShWUw94sITOl+8s6sOTpIPxy9sUNlekc5lB6CHcr7N06KsKMnR9HYimvhcTFO8ATWAurVc3297lmhYdDblCSj0cIxnOCrPUW8xt4NUQ8qTGEph9upZRwihcWjyyPMZ27NOkrjB5IFcn3MpmO+ixMVmd1RdU+yHx9X4en6lmn7zUmuSGETsLBxdc3K8EURg+FnLZ5ttyG2aFSdswzXgqU77Y5POUxJbA4GZpfi/efa5dkpVS0q5HT3HAHj8zEzPbCQSJmVJGnllxiF7+JJZmHPkZumlbBh390jN5WLyJBLXCwc35pZ1CrAdPW+sAVSGhbFbljFipMwnSTdb/WC4VAbMniZ5z46XzOKFP/fnPc51YMHgduRr9ggpcvYd3eGmX5d5hH/rfqQKJC42ArD8UU+iPUzJY6VxzI+awoga3xkbXvahWKIivsamPmTZYMKammkAeI+erFulLUHK6oO8VDZzGXYViPWqQHuPwgnPxczSUDWKIibnTcZs4pPR/lzCj3/4VhLTF/ULD2InSRD4b18FyDIhsQPJJLGglCtiujTW1rYQ4zGa91G7HoUnXNb3/zHGQLVbstILPBmxgZkdL2jmJzSP3g6CntajdpmqrgRr f8GQlpMm 9wkn4QCnjPBMgQq/VTyZS0khfVaWjzZk85LA3E4f8ip4uwpmZFL/8kAq6S59dB2TSmF34JTMjkbPaSFvU1i7itOyr8pgUj5eJosspFhyzF6MKAzI9Oc7GUgycihiJwjzsbLI2ZEIW7WnHoSMEjUVni8FR0q1Xd/aMjUh25ivE0g6YEGmAqOmTEJ/RlCIMiUbUr9pdbI7awbwpjkgD+HwAZpG38vwXHAbLDJXLCCGNSFrbx6nsvwNI0fvVxdA6t/VSa2qDsIADKbYrchw6Bp1DQCOom87CF/mUuhj9YSguXjPFt4mqf8CrqZqNFV+1b7DxpDpK9obTijTrlL8lPfSivAVFfdIRkR+IoDpRL96kdGDXkK+d1CHfy+Cg/N1QzZkyAYCb6IIL92vKTAM+naAb5ipxazgrOgJFma+fUnGqlltQjkILM0vRyVCL7XVtikzSc/7+4KY0q5dtRkiAt4/Q8MZ0VsjygMCgGKln6gFBV86Mt06pPxXUULSX7mkjAYvdYC+e0EEKTbqByVzppYU1sFTiMB5/GK05z1Ykjbx7VrAuv+wX9lgG2jiEKXwyjAkwwlj2/D6oKWsap0kvC6vP5U9e+jlYh6OD3kV5dwXR/8ITszOYoia0dHYA5w8j1ctmCIjlCzspDf67K52yAOTB/6VjYdrpFNOtNOQLEHn9iJM/ggdodHvJ53XpNXNexOPtJzPTPTc7XXFY+RQBCVl81b1sfJA9reZbT74rk6MxLTM0H7wcGL7NuWgD+9HvvGZ0clI9afQYE8ao3Iud7/XBzn//AQ== 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: --_000_DB4PR02MB93344BAA949FA7E25E298C90FEA59DB4PR02MB9334eurp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Michal, Thanks for the quick response! I think we are just trying to get the same v= alue that was available for us in cgroup v1 memory.max_usage_in_bytes. I gu= ess this value also is incomplete for representing the system memory usage.= Is it due the incompleteness that the memory.peak has been left out in the= root of cgroup v2? Best regards, Christopher Wong Axis Communications AB ________________________________ Fr=E5n: Michal Hocko Skickat: den 21 februari 2023 16:07 Till: Matthew Chae Kopia: Johannes Weiner ; Roman Gushchin ; Shakeel Butt ; Andrew Morton ; kernel ; Christopher Wong ; Muchun Song ; cgroups@vger.kernel.org = ; linux-mm@kvack.org ; linux-k= ernel@vger.kernel.org =C4mne: Re: [PATCH] mm/memcontrol: add memory.peak in cgroup root On Tue 21-02-23 15:34:20, Matthew Chae wrote: > The kernel currently doesn't provide any method to show the overall > system's peak memory usage recorded. Instead, only each slice's peak > memory usage recorded except for cgroup root is shown through each > memory.peak. > > Each slice might consume their peak memory at different time. This is > stored at memory.peak in each own slice. The sum of every memory.peak > doesn't mean the total system's peak memory usage recorded. The sum at > certain point without having a peak memory usage in their slice can have > the largest value. > > time | slice1 | slice2 | sum > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > t1 | 50 | 200 | 250 > --------------------------------------- > t2 | 150 | 150 | 300 > --------------------------------------- > t3 | 180 | 20 | 200 > --------------------------------------- > t4 | 80 | 20 | 100 > > memory.peak value of slice1 is 180 and memory.peak value of slice2 is 200= . > Only these information are provided through memory.peak value from each > slice without providing the overall system's peak memory usage. The total > sum of these two value is 380, but this doesn't represent the real peak > memory usage of the overall system. The peak value what we want to get is > shown in t2 as 300, which doesn't have any biggest number even in one > slice. Therefore the proper way to show the system's overall peak memory > usage recorded needs to be provided. The problem I can see is that the root's peak value doesn't really represent the system peak memory usage because it only reflects memcg accounted memory. So there is plenty of memory consumption which is not covered. On top of that a lot of memory contributed to the root memcg is not accounted at all (see try_charge and its callers) so the cumulative hierarchical value is incomplete and I believe misleading as well. -- Michal Hocko SUSE Labs --_000_DB4PR02MB93344BAA949FA7E25E298C90FEA59DB4PR02MB9334eurp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi Michal,

Thanks for the quick response! I think we are just trying to get the same v= alue that was available for us in cgroup v1 memory.max_usage_in_bytes. I gu= ess this value also is incomplete for representing the system memory usage.= Is it due the incompleteness that the memory.peak has been left out in the root of cgroup v2?

Best regards,
Christopher Wong
Axis Communications AB

Fr=E5n: Michal Hocko <mh= ocko@suse.com>
Skickat: den 21 februari 2023 16:07
Till: Matthew Chae <Matthew.Chae@axis.com>
Kopia: Johannes Weiner <hannes@cmpxchg.org>; Roman Gushchin &l= t;roman.gushchin@linux.dev>; Shakeel Butt <shakeelb@google.com>; A= ndrew Morton <akpm@linux-foundation.org>; kernel <kernel@axis.com&= gt;; Christopher Wong <Christopher.Wong@axis.com>; Muchun Song <muchun.song@linux.dev>; cgroups@vger.kernel.org <cgroups@vger.ke= rnel.org>; linux-mm@kvack.org <linux-mm@kvack.org>; linux-kernel@v= ger.kernel.org <linux-kernel@vger.kernel.org>
=C4mne: Re: [PATCH] mm/memcontrol: add memory.peak in cgroup root
 
On Tue 21-02-23 15:34:20, Matthew Chae wrote:
> The kernel currently doesn't provide any method to show the overall > system's peak memory usage recorded. Instead, only each slice's peak > memory usage recorded except for cgroup root is shown through each
> memory.peak.
>
> Each slice might consume their peak memory at different time. This is<= br> > stored at memory.peak in each own slice. The sum of every memory.peak<= br> > doesn't mean the total system's peak memory usage recorded. The sum at=
> certain point without having a peak memory usage in their slice can ha= ve
> the largest value.
>
>        time |  slice1  |&= nbsp; slice2  |   sum
>       =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D
>         t1  |  =   50    |   200    | &nbs= p; 250
>       ----------------------------------= -----
>         t2  |  = 150    |   150    |   30= 0
>       ----------------------------------= -----
>         t3  |  = 180    |    20    | &nbs= p; 200
>       ----------------------------------= -----
>         t4  |  =   80    |    20    | = ;  100
>
> memory.peak value of slice1 is 180 and memory.peak value of slice2 is = 200.
> Only these information are provided through memory.peak value from eac= h
> slice without providing the overall system's peak memory usage. The to= tal
> sum of these two value is 380, but this doesn't represent the real pea= k
> memory usage of the overall system. The peak value what we want to get= is
> shown in t2 as 300, which doesn't have any biggest number even in one<= br> > slice. Therefore the proper way to show the system's overall peak memo= ry
> usage recorded needs to be provided.

The problem I can see is that the root's peak value doesn't really
represent the system peak memory usage because it only reflects memcg
accounted memory. So there is plenty of memory consumption which is not
covered. On top of that a lot of memory contributed to the root memcg is not accounted at all (see try_charge and its callers) so the cumulative
hierarchical value is incomplete and I believe misleading as well.
--
Michal Hocko
SUSE Labs
--_000_DB4PR02MB93344BAA949FA7E25E298C90FEA59DB4PR02MB9334eurp_--