Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3754187iob; Tue, 17 May 2022 06:40:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygWcaqb7IjkTay2Jg1OzOTx2xIrnZoVNT/bZEO86mUtpYAZTMEUO6hGZW8L91Ml5XzOwi9 X-Received: by 2002:a05:6402:1453:b0:42a:ae31:310c with SMTP id d19-20020a056402145300b0042aae31310cmr12127106edx.382.1652794831138; Tue, 17 May 2022 06:40:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652794831; cv=none; d=google.com; s=arc-20160816; b=hqW8fbese07PmGMfNX9KJaEdFJZewUQAexn4NX+7K6ARaCWHlnw6vpof940wj7GLaV 7qfSG23xJN7DhgwoCL/sLPoMpEAyqx80p20n5CFwOAW5apSMWXjZNuyQedWOJIelpllB 6gq4E+neHbHFDggc9HZMWx9e19mtlHB5y/mfJnbXxVTNtzGkfL3x10JCDYbrKEMRflvX nPPqFVAcEmeOCpWTu9cGZ1Tmvk/uPceKtPnJ+xsZsxUQcYD8N9HdQiwIvQtaQuLEMYMb NiaC6gAfkBSKkbmTmJSzkUGutoyP48mMUFVNnBXgQSTozp/9f+LOZdoot/QsFS5FNZqj 723g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Jej/zNlHp42fGBciz21lgfdwP2bYx92R3jqDU7lJwVE=; b=br9Wo1LXbxLO7rQINmBr/B7sBppgo3HKh916bygFZOiJIJqWmZ0S5+X9EiakiNJ2fw a8h03UDA9wf3zHnLmoQpmXJ3CQngNPPQbd0JgND0zXg7lVoayn5McigevcWuo342p0T1 zgKfnRnx/FoUbxvw3rcc8gGeo/Cy8jxznPwUUdWNF9ZCaYZlGbe5ThuQOAouKmziqHdR rmOz7ejo9uwIFlOGBAD4iCD714ftWPSylW1IHZH6EGiR7mg03qdCX5lFihOFx0yAmbpK 5qT+0UKVrIzWAay76Cre0lGai3vFifwxwlLxMqqpzr4bFa43RROQvBV2bzkecoe74PMy gdYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=W2KvdG7R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o5-20020a170906974500b006f3bbacf287si3138026ejy.304.2022.05.17.06.40.03; Tue, 17 May 2022 06:40:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=W2KvdG7R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236566AbiEQDyq (ORCPT + 99 others); Mon, 16 May 2022 23:54:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231331AbiEQDyo (ORCPT ); Mon, 16 May 2022 23:54:44 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6CC62E0BC for ; Mon, 16 May 2022 20:54:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Jej/zNlHp42fGBciz21lgfdwP2bYx92R3jqDU7lJwVE=; b=W2KvdG7RfjLdXNIFYkZIwx/L6b Fm2U74FWqtNH+OJgDlLx9d1KHsLN867E91OX8LoJVgveHLgCkTm7Fi2M/WTi7h7VY2Bixqzpaak8u QeikjgScoYhxNzplj+sD/X5Il7VgyNV7ugN09Lue1oMbdTc592mR1VnZzu7YpZF3myCtp+ppBCxCJ nUhKIaPMPnYhgsUL92ibbsk452jVfiOctJpOq+JjnowXObG6idBJ2dpV037JmWMcNuLX45SC+koje Hy4ZUhvKe0WqeD06xogBXG405qM/ARS5i3f22wJX4DetsjRyEPyIXTY1UKGxNi1HNX52YafY73G10 xYv/jJkA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqoHx-00AVOS-GY; Tue, 17 May 2022 03:54:25 +0000 Date: Tue, 17 May 2022 04:54:25 +0100 From: Matthew Wilcox To: Vasily Averin Cc: Shakeel Butt , Roman Gushchin , Vlastimil Babka , Andrew Morton , Joonsoo Kim , David Rientjes , Pekka Enberg , Christoph Lameter , kernel@openvz.org, Linux MM , LKML , Michal Hocko Subject: Re: [PATCH] tracing: add ACCOUNT flag for allocations from marked slab caches Message-ID: References: <1fd21e25-b095-e055-fc2e-abda640a0575@openvz.org> <0aaf7b6d-6ed7-45ca-873e-394718f73c9a@openvz.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0aaf7b6d-6ed7-45ca-873e-394718f73c9a@openvz.org> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 17, 2022 at 06:32:28AM +0300, Vasily Averin wrote: > > Should this 'if' be unlikely() or should we trace cachep->flags > > explicitly to avoid this branch altogether? > > In general output of cachep->flags can be useful, but at the moment > I am only interested in SLAB_ACCOUNT flag and in any case I would > prefer to translate it to GFP_ACCOUNT. > So I'm going to use unlikely() in v2 patch version. It's still going to be an extra test, and networking is extremely sensitive to extra instructions if tracing is compiled out. Passing in 'cachep' to the trace call looked like the best suggestion to me.