Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp1224329pxb; Sat, 4 Sep 2021 03:58:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZsiIDmHYLlUrZwkqQX6Iu5878GmJ8gJuUQv+Z5Z0dIAcwwfZLNET02XiFCplxhE+06aQm X-Received: by 2002:a6b:c80f:: with SMTP id y15mr2531994iof.80.1630753090918; Sat, 04 Sep 2021 03:58:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630753090; cv=none; d=google.com; s=arc-20160816; b=omFx7CM9Uce1b+prRwpXpFxQi1Jx0fKII39zjhNBLlqvPQanXrAEs/g3Bl/ybnlgBs veE2D5dQg+VnIPjQ+IMVweZ94+N/FjtbSB6t9t1Krhz90mJQcMM5rtHKP2va8TEf85as WzebjJfiPTIl+3V3X+WO619GCurJYhEyND143lDEdjFAtFb1PhLvH0rrSaybDCQ6lmKR 2x4eoueilW4fpjRh1dU00+deXbXgRNFP4ho+xpXwCOZSVP7eQP2DxKsX9a5emrIxFlOd 16fWoj/4lKwz771JMOw011HNuBrY1s9PGshdJOSFEyU3IIQ489IZ51aekAoyoWFptiS0 rnvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=7+4MmuaT7rzL8mD6S0mX3jwc0NJwjLstDiX92Mhzqd4=; b=sEDyzz+u/v9WK4hrlNtkJG8phVmPAjoer6zhCoubfJ3ks20ws32YqLb77BqQpEVNsm 5F7wIL/ywIgn2EDEtdgLGo/WVonfUVUMVoSKZ6UXQ4r+Y4ajwp/BsXKUMZhaM3vrOAoy Cej+Hijy7KyPpUutiN134gMbRLHpcHYraI9Ql6I+0h/NmjIPu1XEIJ9gqmA2RqWpUGeG hc9HEkVaAXUBg+jlq8iPQfBx2/zDUaB3iqnqFHaoH+Z3YUtxw5YqNQ02+aFOmDNyRy/V TzsXuNn8+W61uJaY5iIvuo4+h0xOIzco9rccZNLO6bMRTLajU42i+UChJaORx5BfMnf2 z8Pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=PmmreLIE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q128si2106108ioq.111.2021.09.04.03.57.59; Sat, 04 Sep 2021 03:58:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=PmmreLIE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236237AbhIDKmB (ORCPT + 99 others); Sat, 4 Sep 2021 06:42:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234482AbhIDKmA (ORCPT ); Sat, 4 Sep 2021 06:42:00 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D692C061575; Sat, 4 Sep 2021 03:40:58 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id jg16so3204247ejc.1; Sat, 04 Sep 2021 03:40:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=7+4MmuaT7rzL8mD6S0mX3jwc0NJwjLstDiX92Mhzqd4=; b=PmmreLIE6KPwSpV+eJRLKMgW3Z30UIoOJXn2XWGN5zOeZCiFFCbe72Se9ehgrpy4QD NSUwp6ElCXnxyH3HMiP/c7mvFVBX0VxpM+vAZ6tzeeNkIYoa9IZZ/6Oa9bkdQcsx16zA c3mq2QFsv+7/sMkbzVjO4BjRpMFFTTbjpdXp2iHK5z628+Mtl8+rVvWvWcoEE/qcJLz7 3k424wbk3KYmigidxMfjdlkW1VCzH1CQmEiX3kY44zePy+dMwzYrLWU2Lcly/QHNUfvN OayFV6GeBgs9vriO3vIkYddgKANYIoBqD9OawdPifLI/DOQHSp7UbVhE81giyoFbYeJg 0NEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=7+4MmuaT7rzL8mD6S0mX3jwc0NJwjLstDiX92Mhzqd4=; b=qwt9IeSIX1mElQnaF2dBfkBgh4XphnPtbEQ3gyOvzabpf1jzFQoockp/TVIFmxudRg z2dypKv14h16u7HAu/y9UHDehiqa3YAJCJraJukZbEJBM5esocMorQzM039rRcWbPvIJ b/+0uCZS/WqYdsgoqmgQq3/colOrrYVXwO/rwM8D7fYWBXNtXtBO+4jRIV+YsppMGpJ3 iSMiyseGwRo5kZFgSFBaOhXU70o6TAbs26TfVHG6dzkfScOmLAC0wIrnWtvjrVRY+5vf iR8yTvJq7yvKHuCK3xTjxUG1dtAd5uZxJCJus/9jyg3r4X4njvZPGzQyg8yBDw/ZS4Mz 2bKg== X-Gm-Message-State: AOAM5318wrTQyDFuUsJTqiXQ5n+ckGbM/COoOb2khWVQ3u5hgM7N66J0 PM1w/bWpRHe0zI7v6QD3thZIhXCHCoeh5kU2Tyk= X-Received: by 2002:a17:906:9388:: with SMTP id l8mr3621379ejx.307.1630752056967; Sat, 04 Sep 2021 03:40:56 -0700 (PDT) MIME-Version: 1.0 References: <1629417219-74853-1-git-send-email-wang.yong12@zte.com.cn> In-Reply-To: From: yong w Date: Sat, 4 Sep 2021 18:41:00 +0800 Message-ID: Subject: Re: [PATCH v2] mm: Add configuration to control whether vmpressure notifier is enabled To: Michal Hocko 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Michal Hocko =E4=BA=8E2021=E5=B9=B48=E6=9C=8830=E6=97=A5= =E5=91=A8=E4=B8=80 =E4=B8=8B=E5=8D=889:49=E5=86=99=E9=81=93=EF=BC=9A > > On Sun 22-08-21 17:46:08, yong w wrote: > > > All those reasons should be a part of the changelog. > > >.... > > > I am not sure these are sufficient justifications but that is somethi= ng > > > to discuss. And hence it should be a part of the changelog. > > > > > OK, These reasons will be added to the patch notesin later versions. > > > > > > 3. In the case where the user does not need vmpressure, vmpressure > > > > calculation is additional overhead. > > > > > > You should quantify that and argue why that overhead cannot be furthe= r > > > reduced without config/boot time knobs. > > > > > The test results of the previously used PFT tool may not be obvious. > > Is there a better way to quantify it? > > This is a question for you to answer I am afraid. You want to add a > configuration option and (as explained) that is not free of cost from > the maintenance POV. There must a very good reason to do that. Sorry for the late reply.The previous email mentions some reasons. and several tools were used to test, but the data did not meet the expectat= ions. I'll try other test methods later. > > > > In some special scenes with tight memory, vmpressure will be execut= ed > > > > frequently.we use "likely" and "inline" > > > > to improve the performance of the kernel, why not reduce some > > > > unnecessary calculations? > > > > > > I am all for improving the code. Is it possible to do it by other mea= ns? > > > E.g. reduce a potential overhead when there no events registered? > > Yes, the method you mentioned may be feasible, but it does not conflict > > with this patch. > > 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 whe= ther there is event registration,however, global variables need to be protected with locks. I feel that there is little room for optimization in the code. Thanks.