LVS
lvs-devel
Google
 
Web LinuxVirtualServer.org

Re: [PATCH net-next] Fix clamp() of ip_vs_conn_tab on small memory syste

To: David Laight <David.Laight@xxxxxxxxxx>
Subject: Re: [PATCH net-next] Fix clamp() of ip_vs_conn_tab on small memory systems.
Cc: "'netdev@xxxxxxxxxxxxxxx'" <netdev@xxxxxxxxxxxxxxx>, "'Naresh Kamboju'" <naresh.kamboju@xxxxxxxxxx>, "'Dan Carpenter'" <dan.carpenter@xxxxxxxxxx>, "'pablo@xxxxxxxxxxxxx'" <pablo@xxxxxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, "'open list'" <linux-kernel@xxxxxxxxxxxxxxx>, "'lkft-triage@xxxxxxxxxxxxxxxx'" <lkft-triage@xxxxxxxxxxxxxxxx>, "'Linux Regressions'" <regressions@xxxxxxxxxxxxxxx>, "'Linux ARM'" <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, "'netfilter-devel@xxxxxxxxxxxxxxx'" <netfilter-devel@xxxxxxxxxxxxxxx>, Simon Horman <horms@xxxxxxxxxxxx>, lvs-devel@xxxxxxxxxxxxxxx
From: Julian Anastasov <ja@xxxxxx>
Date: Thu, 19 Dec 2024 07:06:16 +0200 (EET)
        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@xxxxxx>



<Prev in Thread] Current Thread [Next in Thread>