From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17C14C433F5 for ; Mon, 6 Sep 2021 06:37:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0057860F45 for ; Mon, 6 Sep 2021 06:37:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238906AbhIFGiP (ORCPT ); Mon, 6 Sep 2021 02:38:15 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:54940 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229792AbhIFGiO (ORCPT ); Mon, 6 Sep 2021 02:38:14 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id CA74F2007A; Mon, 6 Sep 2021 06:37:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1630910225; h=from:from:reply-to: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=C18ucwuH+xJ590fcQPWTQo1wKpR5pILZsUHhaeFFJM8=; b=NQJNxXbGll03ANbTcVcmNA5GRE1HmZ8q8Gkbt8sMek82fcvVlXMxFNq8skistKpgpjAyFl ptCsa57t0u4Izkcuk8A6SGw5VPSP6VR/Cdm6uuxiUnB8PZPvFHFElwZASWjuaWujvQGPD0 XbzzL0owuRWs7ezDAcoUrEO7IcyHWK8= Received: from suse.cz (unknown [10.100.201.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 02B5DA3B8E; Mon, 6 Sep 2021 06:37:04 +0000 (UTC) Date: Mon, 6 Sep 2021 08:37:04 +0200 From: Michal Hocko To: yong w Cc: Tejun Heo , Jonathan Corbet , Andrew Morton , Vladimir Davydov , Thomas Gleixner , "Peter Zijlstra (Intel)" , Shakeel Butt , Roman Gushchin , alexs@kernel.org, Wei Yang , Hui Su , Stephen Rothwell , wang.yong12@zte.com.cn, Cgroups , linux-doc@vger.kernel.org, LKML , Linux MM , yang.yang29@zte.com.cn Subject: Re: [PATCH v2] mm: Add configuration to control whether vmpressure notifier is enabled Message-ID: References: <1629417219-74853-1-git-send-email-wang.yong12@zte.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org On Sat 04-09-21 18:41:00, yong w wrote: [..] > > It is not in conflict but runtime overhead reduction without more burden > > on the configurability is usually a preferred approach. > I agree with you.I had an idea that we use global variables to identify whether > there is event registration,however, global variables need to be > protected with locks. Have a look at static keys which are usual tool to provide effectivelly zero overhead disabled branch. -- Michal Hocko SUSE Labs