Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp782242lqp; Sat, 13 Apr 2024 21:58:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUruq4aRfWkac4poAx0se+Z5Aw7OTGpYkLrAGKPV5FXGM0JvxTfofc4y1DqIGupLDE5Ki5LD4uTL3GBYqRJAG/rwMWLTaeRaOo/Pk0SYA== X-Google-Smtp-Source: AGHT+IH3GnV0qTlADXszlKcxIrxfc/w2biVJtUKjBnux7KKbzZ/a6XzTiI4evbwJ4KloLDKicLq+ X-Received: by 2002:a05:622a:64d:b0:436:58f9:76f4 with SMTP id a13-20020a05622a064d00b0043658f976f4mr9026003qtb.54.1713070689732; Sat, 13 Apr 2024 21:58:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713070689; cv=pass; d=google.com; s=arc-20160816; b=ErsgS7n6iCcvJT3lL4x9LnNk4bHAuos4evQxV9W8QqbWvgB66RbSfyvyz5zheWZRdK 7N2DjkWKwS5KTDuQirJ+99vRSq5QmAjOn+T2/9uwspHkrJueOChpps4hG3IKjon6LJKT KUscy+lR/6rP8PlQYuInuGGYK+d+J6jfw2dBaVKXTyV2cYlNw0rbk68IPG/vXt66igC4 wilFYQpdPIWd8g19c+vZz9l3l3QKdv/sNj4k0XV0uRnPr4MEcCt07pG6mPSv5BeDUlXs yGbvP1SSVjaAkB5o+A974rYhRJt3gIEdX7xMuObXkfahZOsEV1f6C3XTA4MwaY79TQx8 CNWg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:dkim-signature:date; bh=ZA5aE3j3lTWxM9WMGZSCrXNcLpZkWfP1rN5XDhrTFYg=; fh=TKyHjQj2CFq0Nx2umK0qeoefhuqnOFvP0hgn6uhBIVE=; b=FyK8BGgAmWENnrQqwM3DIjdZdQ739UYviYfHJ3Ac4bbNT6BOSJLfRP0G6czkXjOH/Q lpZc0YjgCW4GQvuIVgZann5QbmIP0neobnJSjjYb713QaMOdJUsHuPTBtljRm1gb4pHD mLCzqpZ4VmBjpd8WFwkj87QMO9hA72kofLkAElXWIHSffWjhEaMhBC7Bdn68oubt68SL bNhr9qvGKw75bBNYRrWwiXHiRGdB/Pgj8ekOq9fcpTXp7I3kuscY0Z4b+d6qPSzCtJ5G ZKP5Xh56h/z4PVquO/lb93sifgue3gPJHbEo7t9xzLxUvgHdf8AIN+EE3jAHfMWv6/sH +peQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=QtAFfyn0; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-143983-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143983-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id v4-20020ac85784000000b004365c39a779si7450004qta.156.2024.04.13.21.58.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Apr 2024 21:58:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-143983-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=QtAFfyn0; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-143983-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143983-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7620A1C20B18 for ; Sun, 14 Apr 2024 04:58:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 68C9E1BF27; Sun, 14 Apr 2024 04:58:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="QtAFfyn0" Received: from out-184.mta0.migadu.com (out-184.mta0.migadu.com [91.218.175.184]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3735918E11 for ; Sun, 14 Apr 2024 04:57:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.184 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713070680; cv=none; b=i/Ux7UJ2It1p4ovyHUz2aJwE9msaL4Fx+QhJShbyRBsrcLtVluVB6P4U8XtTvpp5A6xAMXaEcAopPuYwlOwiGap6iCsyAbV0G5k4qN9c9TungNlsDQ9y/C2TyitvYVMZ0z84U3XieOQR/5LKUbBIQdsO6/gtSTzTc76BIbw3e58= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713070680; c=relaxed/simple; bh=KEWXPQZKMKAZI5UGG+KEr9SgfSlaUFXgtmhVYtAjo5U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LEUFyqOsTzC0lWO0w3oHCuaNfcNKocgRfTa4m/WXso1DESNqaYJVQ9I/nqEWhlz722CRAexo/AjzQBobBM8hXsjQo3qRstezKC9nMA6HmHMapcYqp+iV6xPh71i9ShvQklYzt+kiaQ59j2lXg5w4mzPBI2dRF3Ka3qaPSIDmKgc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=QtAFfyn0; arc=none smtp.client-ip=91.218.175.184 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Date: Sat, 13 Apr 2024 21:57:50 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1713070676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ZA5aE3j3lTWxM9WMGZSCrXNcLpZkWfP1rN5XDhrTFYg=; b=QtAFfyn0DU6DX7p0vHWdOXK+ihaVNuodpMdIhGtBvpUEsDR0RaF4wREOEPDALySzXhWQ19 Xqon6q7mFTvSbHeog01EYdTWf53b0pE6Eg9DO0camN1FNwCz5A7SUir7IdKarfjlCP8bRL qZzML8WeqEsztT4SsIcfPqOsvyKjmiM= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Shakeel Butt To: Vlastimil Babka Cc: Linus Torvalds , Josh Poimboeuf , Jeff Layton , Chuck Lever , Kees Cook , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Roman Gushchin , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Johannes Weiner , Michal Hocko , Muchun Song , Alexander Viro , Christian Brauner , Jan Kara , linux-mm@kvack.org, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v2 2/2] mm, slab: move slab_memcg hooks to mm/memcontrol.c Message-ID: References: <20240325-slab-memcg-v2-0-900a458233a6@suse.cz> <20240325-slab-memcg-v2-2-900a458233a6@suse.cz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240325-slab-memcg-v2-2-900a458233a6@suse.cz> X-Migadu-Flow: FLOW_OUT On Mon, Mar 25, 2024 at 09:20:33AM +0100, Vlastimil Babka wrote: > The hooks make multiple calls to functions in mm/memcontrol.c, including > to th current_obj_cgroup() marked __always_inline. It might be faster to > make a single call to the hook in mm/memcontrol.c instead. The hooks > also don't use almost anything from mm/slub.c. obj_full_size() can move > with the hooks and cache_vmstat_idx() to the internal mm/slab.h > > Reviewed-by: Roman Gushchin > Signed-off-by: Vlastimil Babka Acked-by: Shakeel Butt