mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Julian Anastasov <ja@ssi.bg>
To: David Laight <David.Laight@ACULAB.COM>
Cc: "'netdev@vger.kernel.org'" <netdev@vger.kernel.org>,
	"'Naresh Kamboju'" <naresh.kamboju@linaro.org>,
	"'Dan Carpenter'" <dan.carpenter@linaro.org>,
	"'pablo@netfilter.org'" <pablo@netfilter.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	"'open list'" <linux-kernel@vger.kernel.org>,
	"'lkft-triage@lists.linaro.org'" <lkft-triage@lists.linaro.org>,
	"'Linux Regressions'" <regressions@lists.linux.dev>,
	"'Linux ARM'" <linux-arm-kernel@lists.infradead.org>,
	"'netfilter-devel@vger.kernel.org'"
	<netfilter-devel@vger.kernel.org>,
	Simon Horman <horms@verge.net.au>,
	lvs-devel@vger.kernel.org
Subject: Re: [PATCH net-next] Fix clamp() of ip_vs_conn_tab on small memory systems.
Date: Thu, 19 Dec 2024 07:06:16 +0200 (EET)	[thread overview]
Message-ID: <a0ebe11c-4ca2-d2f3-8e53-0d9f44bfdda0@ssi.bg> (raw)
In-Reply-To: <5e288aa5-5374-5542-b730-f3b923ba5a36@ssi.bg>


	Hello,

On Tue, 17 Dec 2024, Julian Anastasov wrote:

> On Sat, 14 Dec 2024, David Laight wrote:
> 
> > The 'max_avail' value is calculated from the system memory
> > size using order_base_2().
> > order_base_2(x) is defined as '(x) ? fn(x) : 0'.
> > The compiler generates two copies of the code that follows
> > and then expands clamp(max, min, PAGE_SHIFT - 12) (11 on 32bit).
> > This triggers a compile-time assert since min is 5.
> 
> 	8 ?
> 
> > 
> > In reality a system would have to have less than 512MB memory

	Also, note that this is 512KB (practically impossible),
not 512MB. So, it can fail only on build.

Regards

--
Julian Anastasov <ja@ssi.bg>


      reply	other threads:[~2024-12-19  5:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-14 17:30 David Laight
2024-12-16 22:18 ` Julian Anastasov
2024-12-19  5:06   ` Julian Anastasov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a0ebe11c-4ca2-d2f3-8e53-0d9f44bfdda0@ssi.bg \
    --to=ja@ssi.bg \
    --cc=David.Laight@ACULAB.COM \
    --cc=akpm@linux-foundation.org \
    --cc=dan.carpenter@linaro.org \
    --cc=horms@verge.net.au \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkft-triage@lists.linaro.org \
    --cc=lvs-devel@vger.kernel.org \
    --cc=naresh.kamboju@linaro.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=regressions@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®