Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp2244713imc; Tue, 12 Mar 2019 09:46:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqzmOxlOlWgLCInmKzeGRSqDqhwr8DRKDbqeMAyX7xnlvWz6x8LmgcnbuRIMBDQiZGn4eNye X-Received: by 2002:a62:1f58:: with SMTP id f85mr39423831pff.39.1552409196624; Tue, 12 Mar 2019 09:46:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552409196; cv=none; d=google.com; s=arc-20160816; b=UK6hVJ2Df0gn0GEMwOxpUJ/6zJYe9xTJi5/hFNBw9kRs9Xqq8s42Fk852SeOo2UPe3 jaVd7sajNquSANQGyluZ420VejmJlnxSNC7xOXxclJ2c3tsIfvYc8kfMizF5cveWvovZ +af8C+ocY7JtK2jdKZ+esV3pHin6oZcIoOGu8XM7yI5Qi0cL1oq4cvtJnAOlCMcvwTo2 JAzyQE2mssWP4XW3gZPglZFOy9Rz5gOCWx2D1jWnpJFxSd6BuCIszIwNc922W4qBouzc dgdbd9hmNJSI80A8EvzpGRYfRZjenOOMIQECHJujZrZ4p91uPfsNdWYopy5kGBtHhmSe NSyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=w2+DN2EdxMC+DqJF2V5AG1mbh5gPVmAecYxS5FTayVs=; b=D3Hs/N6Eis1pUpoTfqi89sXRvjSu/uYXWX83dtvHTTDQX9R2fL0p6QhgU4bc41bMVq Fjz4auw8IH9ccEQ4s3bfOLHOklYNAjEQSEOj/oWQLuVIps17EABuyPWgEQDig84/eONM tguAdcm9oe2u40A9u2EbXlELahN6f5l07rKSb3NtLKoWGZwm/boI208LQiv8uPNSYvhH s+0vzLUTnrIhcd+Umk108/k/WUaSLNumJu83CUjvt1tStqcQ/Ci5UW1W69ceqh3aVyfY 6ua6NOvfRC6fVDiu0frVan3fpWyLyljmfktp82SMy8OFNd/WdqkIqCWqPAXIzJsFnRXk +N8g== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 31si9060506plj.345.2019.03.12.09.46.20; Tue, 12 Mar 2019 09:46:36 -0700 (PDT) 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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726728AbfCLQoY (ORCPT + 99 others); Tue, 12 Mar 2019 12:44:24 -0400 Received: from mx2.suse.de ([195.135.220.15]:57802 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726329AbfCLQoY (ORCPT ); Tue, 12 Mar 2019 12:44:24 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 4E0F8AF0C; Tue, 12 Mar 2019 16:44:23 +0000 (UTC) Date: Tue, 12 Mar 2019 17:44:22 +0100 From: Michal Hocko To: Yafang Shao Cc: Vlastimil Babka , Souptick Joarder , Andrew Morton , Linux MM , LKML , shaoyafang@didiglobal.com Subject: Re: [PATCH] mm: compaction: some tracepoints should be defined only when CONFIG_COMPACTION is set Message-ID: <20190312164422.GD5721@dhcp22.suse.cz> References: <1551501538-4092-1-git-send-email-laoar.shao@gmail.com> <1551501538-4092-2-git-send-email-laoar.shao@gmail.com> <20190312161803.GC5721@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 13-03-19 00:29:57, Yafang Shao wrote: > On Wed, Mar 13, 2019 at 12:18 AM Michal Hocko wrote: > > > > On Sat 02-03-19 12:38:58, Yafang Shao wrote: > > > Only mm_compaction_isolate_{free, migrate}pages may be used when > > > CONFIG_COMPACTION is not set. > > > All others are used only when CONFIG_COMPACTION is set. > > > > Why is this an improvement? > > > > After this change, if CONFIG_COMPACTION is not set, the tracepoints > that only work when CONFIG_COMPACTION is set will not be exposed to > the usespace. > Without this change, they will always be expose in debugfs no matter > CONFIG_COMPACTION is set or not. And this is exactly something that the changelog should mention. I wasn't aware that we do export tracepoints even when they are not used by any code path. This whole macro based programming is just a black magic. -- Michal Hocko SUSE Labs