Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp3320373ioo; Tue, 24 May 2022 20:09:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEjG8/LnlawbPzdkVibc6Jxak4rjtluxh9wMw8jAnEDwLbKKFJdDeuaEQMj6Ey1osRDBz2 X-Received: by 2002:a05:6402:3491:b0:42b:635a:efaf with SMTP id v17-20020a056402349100b0042b635aefafmr14248811edc.135.1653448182150; Tue, 24 May 2022 20:09:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653448182; cv=none; d=google.com; s=arc-20160816; b=BUGMYQezYwhlLSoeijWOd/7OEQjofFCMfwfDAjp9IyPz3VISm5c9LJ5djS1FAzrzEq xJaY3MbRqM1Gz4H2Jj1RzLyA9WiwClI23UhYE8WFa6qVtuaxHWz6oQrfTLwiS0emIuNm VY1v94UNFViHucdb5j8OunTkLWpFxZ+RslHFDWl+izC3XkHhLhPudlSwlfVyW24GaDRD DbMZLBd1w0ZFAS+nDtUU051cAHkyZ8yNo17N/rCj138EZSzQYNruVZ2wdL0AbUb+L9Io Y7+lAk5q3HeCI/PCsxU28OwpixPEEWKrBemx3L/1dIACw+Oo6cfzyIo53EHXWKvQdpLg 9N2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=u6vbjooibw1bBU8w+t9TM4cW1mxO7NrJrdj9O06jjkw=; b=OzbK7+cipYL383SVPBS0OchElD5YVEac4883Ei20BjA2/X7jYQY3skAt0G+MPqx/oK 6K5QvtDdViTEGttx3a4RHjRTu6yjehgdymiyWhSOmMJVX/JLMVWYsvZfG5vYmihOys2f 1nmU/ga9KTg6U67tLkEYnM3WxX7olkUqv+9BYhqK4Z9aVjN1TQM6UqhhW6Q3CNLBWsLF IuTs9lZ7cX0pi2eMP2fIMICTypilqz2pwg8xpbz2EdmX4R+KPZb89MNdm+Q2TtRfTioe +bC7bcgpAubRmn20ce925Nq823vwLT6/OObnGYFxWGfT8nhcofLDo7DCYEZWVmMrAIrj ErDw== ARC-Authentication-Results: i=1; mx.google.com; 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 b9-20020a056402084900b0042b52c2b22csi12752723edz.561.2022.05.24.20.09.17; Tue, 24 May 2022 20:09:42 -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; 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 S243007AbiEYBWH (ORCPT + 99 others); Tue, 24 May 2022 21:22:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239192AbiEYBWG (ORCPT ); Tue, 24 May 2022 21:22:06 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A6DE3F898 for ; Tue, 24 May 2022 18:22:05 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 20078B81C03 for ; Wed, 25 May 2022 01:22:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C7583C34100; Wed, 25 May 2022 01:22:01 +0000 (UTC) Date: Tue, 24 May 2022 21:22:00 -0400 From: Steven Rostedt To: Wonhyuk Yang Cc: Mel Gorman , Ingo Molnar , Andrew Morton , Baik Song An , Hong Yeon Kim , Taeung Song , linuxgeek@linuxgeek.io, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [Patch v2] [PATCH] mm/page_alloc: Fix tracepoint mm_page_alloc_zone_locked() Message-ID: <20220524212200.207f02a5@gandalf.local.home> In-Reply-To: <20220512025307.57924-1-vvghjk1234@gmail.com> References: <20220512025307.57924-1-vvghjk1234@gmail.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS, 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 Sorry for the late reply, but I finally have time to catchup on my inbox. On Thu, 12 May 2022 11:53:07 +0900 Wonhyuk Yang wrote: > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -2476,6 +2476,9 @@ struct page *__rmqueue_smallest(struct zone *zone, unsigned int order, > del_page_from_free_list(page, zone, current_order); > expand(zone, page, order, current_order, migratetype); > set_pcppage_migratetype(page, migratetype); > + trace_mm_page_alloc_zone_locked(page, order, migratetype, > + pcp_allowed_order(order) && > + migratetype < MIGRATE_PCPTYPES); It would make more sense to put this logic into the TP_fast_assign() if possible. This code is added at the location of execution, and even though it may not run while tracing is disabled, it does affect icache. Could you pass in the order (you already have migratetype) and then in the trace event have: TP_fast_assign( __entry->pfn = page ? page_to_pfn(page) : -1UL; __entry->order = order; __entry->migratetype = migratetype; + __entry->percpu_refill = pcp_allowed_order(order) && migratetype < MIGRATE_PCPTYPES); ), ?? -- Steve > return page; > } >