From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Hocko Subject: Re: [PATCH v2] mm: Add configuration to control whether vmpressure notifier is enabled Date: Mon, 6 Sep 2021 08:37:04 +0200 Message-ID: References: <1629417219-74853-1-git-send-email-wang.yong12@zte.com.cn> Mime-Version: 1.0 Return-path: 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= Content-Disposition: inline In-Reply-To: List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 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