bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH] Implement per task virtual memory limit


From: Diego Nieto Cid
Subject: Re: [RFC PATCH] Implement per task virtual memory limit
Date: Mon, 23 Dec 2024 12:34:17 -0300

On Mon, Dec 23, 2024 at 10:09:35AM -0300, Diego Nieto Cid wrote:
> > 
> > No, this would lock/unlock the map twice. Rather see if you can do the
> > check after the map is already locked, perhaps right before "See
> > whether we can avoid creating a new entry ...".
> >
> 
> At that point vm_map_find_entry_anywhere or vm_map_lookup_entry have already 
> been
> called. I'm not sure if it is ok to check the limit after the map entry is 
> allocated. :/
> 
Well, I've read it again, and it seems neither of those functions allocate 
memory (nor entries)
and just find an existing entry for a given address (or map in the case of 
vm_map_find_entry_anywhere).

So I believe it's possible to relocate the check to avoid locking twice.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]