From: Greg KH <gregkh@linuxfoundation.org>
To: David Laight <David.Laight@aculab.com>
Cc: Linux regressions mailing list <regressions@lists.linux.dev>,
Sasha Levin <sashal@kernel.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [regression] linux-6.6.y, minmax: virtual memory exhausted in i586 chroot during kernel compilation
Date: Tue, 13 Feb 2024 17:05:57 +0100 [thread overview]
Message-ID: <2024021331-famished-underpass-1080@gregkh> (raw)
In-Reply-To: <19d0ed563ba0449dac089b95456026dd@AcuMS.aculab.com>
On Tue, Feb 13, 2024 at 03:13:10PM +0000, David Laight wrote:
> From: Linux regression tracking (Thorsten Leemhuis)
> > Sent: 13 February 2024 15:01
> >
> > On 13.02.24 15:50, Greg KH wrote:
> > > On Mon, Feb 12, 2024 at 05:16:58PM +0100, Linux regression tracking (Thorsten Leemhuis) wrote:
> > >>
> > >> I noticed a regression report in bugzilla.kernel.org that seems to be
> > >> specific to the linux-6.6.y series:
> > >>
> > >> Quoting from https://bugzilla.kernel.org/show_bug.cgi?id=218484 :
> > >>
> > >>> After upgrading to version 6.6.16, the kernel compilation on a i586
> > >>> arch (on a 32bit chroot in a 64bit host) fails with a message:
> > >>>
> > >>> virtual memory exhausted: Cannot allocate memory
> > >>>
> > >>> this happens even lowering the number of parallel compilation
> > >>> threads. On a x86_64 arch the same problem doesn't occur. It's not
> > >>> clear whether some weird recursion is triggered that exhausts the
> > >>> memory, but it seems that the problem is caused by the patchset
> > >>> 'minmax' added to the 6.6.16 version, in particular it seems caused
> > >>> by these patches:
> > >>>
> > >>> - minmax-allow-min-max-clamp-if-the-arguments-have-the-same-signedness.patch
> > >>> - minmax-fix-indentation-of-__cmp_once-and-__clamp_once.patch
> > >>> - minmax-allow-comparisons-of-int-against-unsigned-char-short.patch
> > >>> - minmax-relax-check-to-allow-comparison-between-unsigned-arguments-and-signed-constants.patch
> > >>>
> > >>> Reverting those patches fixes the memory exhaustion problem during compilation.
> > >>
> > >> The reporter later added:
> > >>
> > >>> From a quick test the same problem doesn't occur in 6.8-rc4.
> > >> See the ticket for more details.
> > >
> > > I think this was already fixed in 6.7 or Linus's tree, but I can't seem
> > > to find the commit at the moment.
> >
> > I thought so as well, but was in the same situation. But your comment
> > made me look again and now I found it: that was 31e97d7c9ae3de ("media:
> > solo6x10: replace max(a, min(b, c)) by clamp(b, a, c)"), which indeed is
> > not yet in 6.6.y.
>
> The code is actually (now) doing:
> clamp(b, clamp(c, a, d), d)
> but previously was four nested min()/max().
> Even the a/b/c/d aren't trivial.
> It always was a pretty long line, but the longer expansions made it explode.
>
> I was mildly surprised to see the minmax changes backported.
> Not complaining though.
They were needed to fix build errors in a different driver that was
depending on the type checking changes in them. That's why I added
them.
> But 31e97d7c9ae3de needs backporting as well.
Now queued up, thanks.
greg k-h
prev parent reply other threads:[~2024-02-13 16:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-12 16:16 [regression] linux-6.6.y, minmax: virtual memory exhausted in i586 chroot during kernel compilation Linux regression tracking (Thorsten Leemhuis)
2024-02-13 14:50 ` Greg KH
2024-02-13 15:01 ` Linux regression tracking (Thorsten Leemhuis)
2024-02-13 15:09 ` Greg KH
2024-02-13 15:13 ` David Laight
2024-02-13 16:05 ` Greg KH [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=2024021331-famished-underpass-1080@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=David.Laight@aculab.com \
--cc=linux-kernel@vger.kernel.org \
--cc=regressions@lists.linux.dev \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).