Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4031057ybl; Mon, 3 Feb 2020 11:11:17 -0800 (PST) X-Google-Smtp-Source: APXvYqzj3a22CinJX+VI8uX2E8xAopXChpc1+C4fofFbEVhIMLod4d9j2/d8BKc2e4GsuDSlkdgb X-Received: by 2002:aca:fd4c:: with SMTP id b73mr390180oii.33.1580757077180; Mon, 03 Feb 2020 11:11:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580757077; cv=none; d=google.com; s=arc-20160816; b=i3z6Cy14hBJ53CQGmYksH6jcVjl7Y1/8nnsNf6dPDRAUPyX4P/rplBNmRw5zN1PctO iQiuLb8vHAfzIS6i/Uf2iPm5i/97V2WTOQiNXsZYRJb8SBRxKMcDwuiK1zqaHRk1ouEZ RA1DB30E5+LKEH12RusjR0x0EPcsUv05wv9/aRv8SUc3DnYfyLaFWtGur2Z4thFW8jLk qZWAqFTCCUeEHGnq33i70xoFWn4Xarm/dSkik1kk4e/UpS30pTjVoWZNT7gKYuPIi6ok ar8mNJBJcZvCMXz+1LjYJcS2xxODK3e+OQogPqD7CnKXe7DiZUf6o9rzM4BQpKBD3+ne V+VA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Ld2hKo1VVtLh85GuM95xkpkrEOr4cXfnnR866Aylne8=; b=D13Nl5sxpfMlPn086gU+UA48dDzGbUsaN9CQ7IxfjpDlvklgSb0DLxXwzGbFon+QJF jvZiQeJCee2CpgzX90i+1lkE+mv3M9MoOluG3xGpmdfxdUwjkP1ECozlSY8LfZnpW/2X pXgm2XY2V76q7EP5iDuVeL2AClgWizFlXV7BIqK7El+SdjvjbZzU8BXTWHlEjtOzX8ui F58WXVm8YpS45ajDsU90Nf7DkMcyoNKHwvoSjejqbXXBu+1wqiAcJDhsrB4TyubugAs5 F7r6/YCdjj93Ni7inU+YKZjbiI0R/pozGEF5IyxmmsrDeiVeVsIPntNRPQ9qwGOCuqCt ioBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b="Y1/bjlAv"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m7si9926665otk.73.2020.02.03.11.11.04; Mon, 03 Feb 2020 11:11:17 -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=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b="Y1/bjlAv"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729280AbgBCRqb (ORCPT + 98 others); Mon, 3 Feb 2020 12:46:31 -0500 Received: from mail-qt1-f196.google.com ([209.85.160.196]:35745 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728445AbgBCRqa (ORCPT ); Mon, 3 Feb 2020 12:46:30 -0500 Received: by mail-qt1-f196.google.com with SMTP id n17so10959968qtv.2 for ; Mon, 03 Feb 2020 09:46:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Ld2hKo1VVtLh85GuM95xkpkrEOr4cXfnnR866Aylne8=; b=Y1/bjlAvmbsCw+bx5ccjZlMG2O3glyHFV3S5dKW6bP6V+qr3NIns7f/4mkKEHGTzzs fHs5IkFUIwjEGnQe+EaR/cGJ+B3/+ChcGDy9/59MzIlCPtqMU9gup1upmpHCwo26gOXJ oihBsBlNVxLXkyAEZnT4CPJxWU+GwxwmXqbEEoGQtLuF8I38LadB2rxbLKJ+ybLtztrG +s0FYr4E1HJIBvHVry5aG0xS7yL9QFbN9Y+OU9OvLTeyPFNP9YWAQQcxfbV3tAvzYxap CKenXp5FVlXI4+t6JZp5XbFXZECooC8QXqOPVjCaEVxeX0TMIekFqmrTKKUh0SdaTNGk 33BA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Ld2hKo1VVtLh85GuM95xkpkrEOr4cXfnnR866Aylne8=; b=V9BxuFIaOiahiUUoR+iJUmdugRlntqwVDsJN8yo99cIBdSe1U//an+Uqza4GAytfrZ XLMvjavihReuabaH6j1RQojAehW0Ylg0OIHiIsQvKhjMy2q2renzUwWcE1iN8d1U+nhd mbFR/WqJSaYqFb32WzZnOXltrwsmn08ngh6vQRmmw4/3Lbei2bXFD87Hgz+6pnQuRd6O QkOfUA414KbDESQC7xtEMhkYcwfm+2akaMH8XguGzjSaLRIuIpZkmzXvSXF5wn2L2f69 6ap9uFcz2h8Dbxll2WOpOoxwEtzKFieJ+1cTBLeuSj++p//nxWYvpy7D5pSF2nSQbwBO 2QLg== X-Gm-Message-State: APjAAAVMAGnjJdgDaj6S+MmrQwU3B6B8dY+FtLQNWm3ORajvbQXsVI0O TgnTJquRyyz8vASUhVv1cPuzmQ== X-Received: by 2002:ac8:4257:: with SMTP id r23mr24372603qtm.126.1580751989839; Mon, 03 Feb 2020 09:46:29 -0800 (PST) Received: from localhost ([163.114.130.128]) by smtp.gmail.com with ESMTPSA id g53sm10430559qtk.76.2020.02.03.09.46.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Feb 2020 09:46:29 -0800 (PST) Date: Mon, 3 Feb 2020 12:44:18 -0500 From: Johannes Weiner To: Roman Gushchin Cc: linux-mm@kvack.org, Andrew Morton , Michal Hocko , Shakeel Butt , Vladimir Davydov , linux-kernel@vger.kernel.org, kernel-team@fb.com, Bharata B Rao , Yafang Shao Subject: Re: [PATCH v2 11/28] mm: slub: implement SLUB version of obj_to_index() Message-ID: <20200203174418.GE1697@cmpxchg.org> References: <20200127173453.2089565-1-guro@fb.com> <20200127173453.2089565-12-guro@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200127173453.2089565-12-guro@fb.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 27, 2020 at 09:34:36AM -0800, Roman Gushchin wrote: > This commit implements SLUB version of the obj_to_index() function, > which will be required to calculate the offset of obj_cgroup in the > obj_cgroups vector to store/obtain the objcg ownership data. > > To make it faster, let's repeat the SLAB's trick introduced by > commit 6a2d7a955d8d ("[PATCH] SLAB: use a multiply instead of a > divide in obj_to_index()") and avoid an expensive division. > > Signed-off-by: Roman Gushchin > Acked-by: Christoph Lameter Acked-by: Johannes Weiner