From: Christoph Hellwig <hch@lst.de>
To: Michal Hocko <mhocko@suse.com>
Cc: Christoph Hellwig <hch@lst.de>,
Andrew Morton <akpm@linux-foundation.org>,
mm-commits@vger.kernel.org, stable@vger.kernel.org,
john.p.donnelly@oracle.com, david@redhat.com, bhe@redhat.com
Subject: Re: + dma-pool-do-not-complain-if-dma-pool-is-not-allocated.patch added to mm-hotfixes-unstable branch
Date: Sat, 13 Aug 2022 08:29:13 +0200 [thread overview]
Message-ID: <20220813062913.GA10523@lst.de> (raw)
In-Reply-To: <YvTRFxkmSuDAyVdI@dhcp22.suse.cz>
On Thu, Aug 11, 2022 at 11:51:19AM +0200, Michal Hocko wrote:
> this will not consider any gaps in the zone. We have zone_managed_pages
> which tells you how many pages there are in the zone which have been
> provided to the page allocator which seems like something that would fit
> better. And it is also much better than basing it on the global amount
> of memory which just doesn't make much sens for constrained zones
Yes, that is a much better helper.
> Except that it will not work for this case as
> +static unsigned long calculate_pool_size(unsigned long zone_pages)
> +{
> + unsigned long nr_pages = min_t(unsigned long,
> + zone_pages / (SZ_1G / SZ_128K),
> + MAX_ORDER_NR_PAGES);
> +
> + return max_t(unsigned long, nr_pages << PAGE_SHIFT, SZ_128K);
> +}
>
> this will return 128kB, correct?
Yes.
> The DMA zone still has 126kB of usable memory. I think what you
> want/need to do something like
No. If you don't have 128k free you have another bug and we really
should warn here. Please go back to that system and figure out what
uses up almost all of ZONE_DMA on that system, because we have another
big problem there.
next prev parent reply other threads:[~2022-08-13 6:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-10 1:33 + dma-pool-do-not-complain-if-dma-pool-is-not-allocated.patch added to mm-hotfixes-unstable branch Andrew Morton
2022-08-10 14:00 ` Christoph Hellwig
2022-08-10 18:48 ` Michal Hocko
2022-08-11 9:29 ` Christoph Hellwig
2022-08-11 9:51 ` Michal Hocko
2022-08-13 6:29 ` Christoph Hellwig [this message]
2022-08-15 8:42 ` Michal Hocko
2022-08-17 6:00 ` Christoph Hellwig
2022-08-17 6:43 ` Michal Hocko
2022-08-13 6:33 ` Christoph Hellwig
2022-08-13 21:25 ` Andrew Morton
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=20220813062913.GA10523@lst.de \
--to=hch@lst.de \
--cc=akpm@linux-foundation.org \
--cc=bhe@redhat.com \
--cc=david@redhat.com \
--cc=john.p.donnelly@oracle.com \
--cc=mhocko@suse.com \
--cc=mm-commits@vger.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