linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Uladzislau Rezki <urezki@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Ping Fang <pifang@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Roman Gushchin <guro@fb.com>, Michal Hocko <mhocko@suse.com>,
	Oscar Salvador <osalvador@suse.de>,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [PATCH v1] mm/vmalloc: fix exact allocations with an alignment > 1
Date: Wed, 22 Sep 2021 10:34:55 +0200	[thread overview]
Message-ID: <7f62d710-ca85-7d33-332a-25ff88b5452f@redhat.com> (raw)
In-Reply-To: <20210921221337.GA60191@pc638.lan>

>> No, that's leaking implementation details to the caller. And no, increasing
>> the range and eventually allocating something bigger (e.g., placing a huge
>> page where it might not have been possible) is not acceptable for KASAN.
>>
>> If you're terribly unhappy with this patch,
> Sorry to say but it simple does not make sense.
> 

Let's agree to disagree.

find_vmap_lowest_match() is imprecise now and that's an issue for exact 
allocations. We can either make it fully precise again (eventually 
degrading allocation performance) or just special-case exact allocations 
to fix the regression.

I decided to go the easy path and do the latter; I do agree that making 
find_vmap_lowest_match() fully precise again might be preferred -- we 
could have other allocations failing right now although there are still 
suitable holes.

I briefly thought about performing the search in 
find_vmap_lowest_match() twice. First, start the search without an 
extended range, and fallback to the extended range if that search fails. 
Unfortunately, I think that still won't make the function completely 
precise due to the way we might miss searching some suitable subtrees.

>>
>> please suggest something reasonable to fix exact allocations:
>> a) Fixes the KASAN use case.
>> b) Allows for automatic placement of huge pages for exact allocations.
>> c) Doesn't leak implementation details into the caller.
>>
> I am looking at it.

Thanks!

-- 
Thanks,

David / dhildenb



  reply	other threads:[~2021-09-22  8:35 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-08 13:27 [PATCH v1] mm/vmalloc: fix exact allocations with an alignment > 1 David Hildenbrand
2021-09-13  8:29 ` Uladzislau Rezki
2021-09-13  8:44 ` Uladzislau Rezki
2021-09-14 19:15   ` Uladzislau Rezki
2021-09-15  9:02     ` David Hildenbrand
2021-09-16 19:34       ` Uladzislau Rezki
2021-09-17  8:47         ` David Hildenbrand
2021-09-21 22:13           ` Uladzislau Rezki
2021-09-22  8:34             ` David Hildenbrand [this message]
2021-09-22 10:41               ` Uladzislau Rezki
2021-09-23 17:42                 ` David Hildenbrand
2021-09-24 12:42                 ` David Hildenbrand
2021-09-29 14:30                   ` Uladzislau Rezki
2021-09-29 14:40                     ` David Hildenbrand
2021-09-29 14:49                       ` Uladzislau Rezki
2021-09-29 15:05                         ` David Hildenbrand
2021-09-29 16:08                           ` Uladzislau Rezki
2021-09-29 16:10                             ` David Hildenbrand

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=7f62d710-ca85-7d33-332a-25ff88b5452f@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=guro@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=osalvador@suse.de \
    --cc=pifang@redhat.com \
    --cc=urezki@gmail.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;
as well as URLs for NNTP newsgroup(s).