Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp416133pxj; Fri, 28 May 2021 07:00:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDOAta2YY+w3Ut6pzlA5jGvSzsyFf/vfWi7ym+y7cTLuBFGcv6mn0Tx3SzRVeuUzR5t1II X-Received: by 2002:a05:6e02:ce:: with SMTP id r14mr7121515ilq.27.1622210407643; Fri, 28 May 2021 07:00:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622210407; cv=none; d=google.com; s=arc-20160816; b=tVkgXJSZZHhvl2BNpJzx54SdXhNwrT7weNZO7KuziE/LnqWt3xn5IdU6uDNoZhT+vb c7O0H7FypZ+MXmFKVuCdX7f4pPc6sj8alZCuNzOHFzZ59LgU61kuuTEs7+tWHuvl5OD4 3mqoPjf0N0bp0JGwzZZp2uwAGCjc68FzifaymfCSPtuzc7ZEgZTchgQag9NNc3xTan6+ Uw8EyrL2gSe6MAljRmNWjMEhB4N4Qo3qUBYWo2wXUrTTE9XL3Dkyv2u/TzCcpgNtWiPj 1hrbdWDoJhYSlX/QCNN6WWce8xmkEq0y1df3xKvKv0hM3z7bodYMfB+GhB26As7Ntuh9 T4ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:importance:content-transfer-encoding :mime-version:subject:message-id:cc:to:from:date:dkim-signature :dkim-signature; bh=2zUdfESLewKQxZBRQJJmyqbif3VULyS7oSvuoupAakc=; b=EndHALe0qIWbw8GutPN1bZG/2VD9Eq8FIaiRM97eHQhiU5hBWtp4GU5951/xV77YWj gJCiobge5gHa/KmNPmKc0Ojnt4nmoOMLWAq+EZoPwUswNcouSZPkiFh3E5jHV8fd4IOG AJE9/xHFiyYXk0pKSqgvlesUfJWZvSe40cHUiZ7By5Kw97av4vtwhMbcY1y9yvIkeczT TxV1LcurLXdq36OhxN2FL251Jm0SSBRckArFbf49iBl4U5yhXJAdTtD81boZdiOEXkXg R8LAtIkcikiQ+HohZcLH16LXLL9fojkbPQkLLcEYJitl2Q/YOt04a2rVLwUU4x305+YC XjHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailbox.org header.s=mail20150812 header.b=JQoeGQA7; dkim=pass header.i=@mailbox.org header.s=mail20150812 header.b=EKS6oVmq; 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=REJECT sp=REJECT dis=NONE) header.from=mailbox.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i9si5443450ioh.53.2021.05.28.06.59.53; Fri, 28 May 2021 07:00:07 -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=@mailbox.org header.s=mail20150812 header.b=JQoeGQA7; dkim=pass header.i=@mailbox.org header.s=mail20150812 header.b=EKS6oVmq; 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=REJECT sp=REJECT dis=NONE) header.from=mailbox.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235874AbhE1MKg (ORCPT + 99 others); Fri, 28 May 2021 08:10:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230256AbhE1MKf (ORCPT ); Fri, 28 May 2021 08:10:35 -0400 Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [IPv6:2001:67c:2050::465:101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D427C061574 for ; Fri, 28 May 2021 05:09:00 -0700 (PDT) Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4Fs3Ph57FhzQjVP; Fri, 28 May 2021 14:08:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mailbox.org; h= content-transfer-encoding:content-type:content-type:mime-version :subject:subject:message-id:from:from:date:date:received; s= mail20150812; t=1622203733; bh=qmRVtgKH5KcVuczEKLMzuL/gLl6UPj+N2 waMLRTwVNY=; b=JQoeGQA7/C60HG+1qYSIkoTs1ZbhdGZ+KuQ2ckslO4x9wdUep N+T+QXU5veI5Y6c9bgwzi1yM+26jGE6IIspkZMRl83MoxIk0OMQ/GeY5MICfA7wM corwTo3ZPt09YkPsIEHSAYGip6m0zfzL1A5D0dQ6wyEUrezAj9zmXzyEz5btlUFU YXQ/CYkQKP3oJiTLZIXONg3cl/YdMMqFPJQu82Kzncti+okyC8y7vCkikCrkdCE8 L6MAjrwHLjVqvCiSdaQH2DUD4MdHZvuW7gPEYfSevUGNlrDRA9aGlFk+RPt3JSVq oREi2paR1zpPbekNbodtKlu8M5NOUKCuVymeg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1622203734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2zUdfESLewKQxZBRQJJmyqbif3VULyS7oSvuoupAakc=; b=EKS6oVmqbvy1JVf4yj8qzLvV/7woO9CWdl9uEhGOq3gO2E9nfNPYqof08Dcspy6w+24n4d YHKPPoG52oYebqLHx34ktvGsBdeO57Ty1A4sMm/ARNxxygrAMQyKaSKQHOJ7Vhv7DHCHpw j3CgP7ZBOyQh9Zmv1nui219B3pEtJ0Sat5+XHdYmvxs8N8gognYeDr7Gli1qenlX4uGaN9 SfjbuyBlyP/ESiG3coCfxppEPZq8yMFFpBdB9SecHsNHVaubDQ0LE3bqW6fttiyNN0rh53 BnNMul414Q/OhDKtUIZtqiI/5n4H6N8prXREKmxN8jVm15+G8SzmxZEWplVgjA== X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter02.heinlein-hosting.de (spamfilter02.heinlein-hosting.de [80.241.56.116]) (amavisd-new, port 10030) with ESMTP id jiVzwCLQsXZ5; Fri, 28 May 2021 14:08:53 +0200 (CEST) Date: Fri, 28 May 2021 14:08:53 +0200 (CEST) From: torvic9@mailbox.org To: "linux-kernel@vger.kernel.org" , "akpm@linux-foundation.org" Cc: "linux-mm@kvack.org" Message-ID: <1825464932.40588.1622203733380@office.mailbox.org> Subject: [Question] mm/vmpressure.c: ilog2 calculation in constant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Normal X-MBO-SPAM-Probability: *** X-Rspamd-Score: 3.69 / 15.00 / 15.00 X-Rspamd-Queue-Id: AEBED181C X-Rspamd-UID: 46fe9c Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, in mm/vmpressure.c, we have defined this constant: static const unsigned int vmpressure_level_critical_prio = ilog2(100 / 10); My question is: Why do we calculate ilog2 instead of simply setting the constant to '3'? Then, I guess, we could also get rid of the log2.h include. Note that this is just a question, not a request, as I'm sure there is a reason for this. (given the help text in the comment just above) Greetings, Tor Vic