From: Andrew Morton <akpm@linux-foundation.org>
To: lipeifeng@oppo.com
Cc: peifeng55@gmail.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, 21cnbao@gmail.com,
zhangshiming@oppo.com
Subject: Re: [PATCH] mm: modify the method to search addr in unmapped_area
Date: Wed, 20 Apr 2022 14:57:39 -0700 [thread overview]
Message-ID: <20220420145739.425c01603a6f63e550e556ed@linux-foundation.org> (raw)
In-Reply-To: <20220420084039.1431-1-lipeifeng@oppo.com>
On Wed, 20 Apr 2022 16:40:39 +0800 lipeifeng@oppo.com wrote:
> The old method will firstly find the space in len(info->length
> + info->align_mask), and get address at the desired alignment.
>
> Sometime, addr would be failed if there are enough
> addr space in kernel by above method, e.g., you can't get a
> addr sized in 1Mbytes, align_mask 1Mbytes successfully although
> there are still (2M-1)bytes space in kernel.
>
> This patch would fix thr problem above by the new method: find the
> space in info->length and judge if at the desired info->align_mask
> at the same time.
>
> Do a simple test in TIF_32BIT with unmapped_area:
> - Try to take addr (size:1M align:2M) until allocation fails;
> - Try to take addr (size:1M align:1M) and account how to space can
> be alloced successfully.
>
> Before optimization: alloced 0 bytes.
> After optimization: alloced 1.9+G bytes.
Thanks.
Unfortunately this part of the code is undergoing a lot of change
lately. How serious is this problem? Please tell us how often the
problem is being observed, under what circumstances, etc.
next prev parent reply other threads:[~2022-04-20 21:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-20 8:40 lipeifeng
2022-04-20 21:57 ` Andrew Morton [this message]
2022-04-21 2:20 ` lipeifeng
2022-04-24 10:33 ` lipeifeng
-- strict thread matches above, loose matches on Subject: below --
2022-04-14 6:57 lipeifeng
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=20220420145739.425c01603a6f63e550e556ed@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=21cnbao@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lipeifeng@oppo.com \
--cc=peifeng55@gmail.com \
--cc=zhangshiming@oppo.com \
/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