Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2444949ybl; Thu, 9 Jan 2020 12:55:14 -0800 (PST) X-Google-Smtp-Source: APXvYqzZXok+qk2MRnoRS8JeuJPMvq/QuPEP6tpkPCeW/nh32Ei98EBNPj02alPeUsH4SwMIckNr X-Received: by 2002:a05:6808:ab1:: with SMTP id r17mr4508537oij.141.1578603314559; Thu, 09 Jan 2020 12:55:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578603314; cv=none; d=google.com; s=arc-20160816; b=WKolD/kDaRcK5voT9xMq+zboIU6vBeHAnhf4i/KPqx3yariyUfF6MjLzIildKvO3c6 OFtYisQ0SmP5ry08Mir99twgNXyN/EsaDXEQWsJLa2DZv3Hn/3kHsvPJjPS/PHx091LO kuqecCqraxLc1vwwX0tVQeuEIl7PK/I7dHHdaQjemz6e0TW+3Izv5QtxgMNT+sgXYUVm 9sHzzsScDFZh+F/9LmyIq8VOPGqow3mI2aWovl4JDl6+r4Iv6uVclXpgK5n+ouS6YyuQ EPr3+qxzxRjimWYVCKAsczyjBPBPqEhooktzLl7szx5JkC06rpP14/7cm3gVSAgZoX3K Ajjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject :smtp-origin-cluster:cc:to:smtp-origin-hostname:from :smtp-origin-hostprefix:dkim-signature; bh=wvt7sOKddWl0OpvJUtFtaN/ehHbunwfiqpNcAec1a6Y=; b=FpMvs8948Bk3UX0AzrIME2p7xzzIVxAV5tDAVBDlv2DKkE9iYjcTR8fVMPPuRlqxSH 8j3I3xN+Yl6iUqieGm2aYw+l9BAwZ2d7FGysu6O0o5C5xNQcmcayufqOiNPumNND1zpv DWdbWiPK+kTjMb6AFGhPjveY8mmxLjuf5L0qH5/lk59Yd/3kzATcJWREhPkT2dgVm6Fa ZlEuZzrk9QfIohNskKyPHyW7pLTVh3DBvEgf73MbeGL2xRjZRsaqE86cDcFvctFWn4El 8bGRTKMr9FvFgRHP5eSEBAmuQtjyv9gNZFX5//VXkmbd5jNj6ZFis6/DSzhGOoBkWHD3 QhRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=H6lqO3hx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i12si4624155otl.74.2020.01.09.12.55.02; Thu, 09 Jan 2020 12:55:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=H6lqO3hx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730238AbgAIU1Q (ORCPT + 99 others); Thu, 9 Jan 2020 15:27:16 -0500 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:38920 "EHLO mx0b-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728661AbgAIU1P (ORCPT ); Thu, 9 Jan 2020 15:27:15 -0500 Received: from pps.filterd (m0109332.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 009KPj7s008585 for ; Thu, 9 Jan 2020 12:27:14 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=facebook; bh=wvt7sOKddWl0OpvJUtFtaN/ehHbunwfiqpNcAec1a6Y=; b=H6lqO3hxvV/U1RtFT580/PVf9JAYUvevGXleupjBwf4TSFSvd3DmHlULkNbxzNwACWVx 0CZrea7aVieHwV7pH1Iy0o10whSr2MjRaOAKWAksCnnWWZweQodEu/m4bS4fmJmEtbeg kFItkSiyPWv8NOBrM3gO0XWnje1/RWQhwd0= Received: from mail.thefacebook.com (mailout.thefacebook.com [199.201.64.23]) by mx0a-00082601.pphosted.com with ESMTP id 2xe2exu210-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Thu, 09 Jan 2020 12:27:13 -0800 Received: from intmgw001.06.prn3.facebook.com (2620:10d:c081:10::13) by mail.thefacebook.com (2620:10d:c081:35::129) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.1.1713.5; Thu, 9 Jan 2020 12:27:12 -0800 Received: by devvm2643.prn2.facebook.com (Postfix, from userid 111017) id 24D471D2F0DC2; Thu, 9 Jan 2020 12:27:07 -0800 (PST) Smtp-Origin-Hostprefix: devvm From: Roman Gushchin Smtp-Origin-Hostname: devvm2643.prn2.facebook.com To: , Andrew Morton CC: Michal Hocko , Johannes Weiner , Shakeel Butt , Vladimir Davydov , , , Roman Gushchin Smtp-Origin-Cluster: prn2c23 Subject: [PATCH v2 0/6] mm: memcg: kmem API cleanup Date: Thu, 9 Jan 2020 12:26:53 -0800 Message-ID: <20200109202659.752357-1-guro@fb.com> X-Mailer: git-send-email 2.17.1 X-FB-Internal: Safe MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-01-09_04:2020-01-09,2020-01-09 signatures=0 X-Proofpoint-Spam-Details: rule=fb_default_notspam policy=fb_default score=0 phishscore=0 impostorscore=0 spamscore=0 suspectscore=0 malwarescore=0 priorityscore=1501 mlxlogscore=659 mlxscore=0 clxscore=1015 adultscore=0 bulkscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-2001090168 X-FB-Internal: deliver Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset aims to clean up the kernel memory charging API. It doesn't bring any functional changes, just removes unused arguments, renames some functions and fixes some comments. Currently it's not obvious which functions are most basic (memcg_kmem_(un)charge_memcg()) and which are based on them (memcg_kmem_(un)charge()). The patchset renames these functions and removes unused arguments: TL;DR: was: memcg_kmem_charge_memcg(page, gfp, order, memcg) memcg_kmem_uncharge_memcg(memcg, nr_pages) memcg_kmem_charge(page, gfp, order) memcg_kmem_uncharge(page, order) now: memcg_kmem_charge(memcg, gfp, nr_pages) memcg_kmem_uncharge(memcg, nr_pages) memcg_kmem_charge_page(page, gfp, order) memcg_kmem_uncharge_page(page, order) v2: 1) Dropped the first patch, which was incorrect. Thanks, Andrew! Roman Gushchin (6): mm: kmem: cleanup (__)memcg_kmem_charge_memcg() arguments mm: kmem: cleanup memcg_kmem_uncharge_memcg() arguments mm: kmem: rename memcg_kmem_(un)charge() into memcg_kmem_(un)charge_page() mm: kmem: switch to nr_pages in (__)memcg_kmem_charge_memcg() mm: memcg/slab: cache page number in memcg_(un)charge_slab() mm: kmem: rename (__)memcg_kmem_(un)charge_memcg() to __memcg_kmem_(un)charge() fs/pipe.c | 2 +- include/linux/memcontrol.h | 42 +++++++++++++++-------------- kernel/fork.c | 9 ++++--- mm/memcontrol.c | 54 ++++++++++++++++++-------------------- mm/page_alloc.c | 4 +-- mm/slab.h | 22 +++++++++------- 6 files changed, 68 insertions(+), 65 deletions(-) -- 2.21.1