[haiku-commits] Re: haiku: hrev52637 - src/system/kernel/vm

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 11 Dec 2018 21:53:23 +0100

Am 11/12/2018 um 20:45 schrieb waddlesplash:

-       if (status != B_OK) {
-               // TODO: wait and try again once this is working in the backend
-#if 0
[...]
+       if (status == B_NO_MEMORY
+               && addressRestrictions->address_specification == 
B_ANY_KERNEL_ADDRESS) {
+               // issue a low resource notification and try again
+               low_resource(B_KERNEL_RESOURCE_ADDRESS_SPACE, size, 
B_RELATIVE_TIMEOUT,
+                       ((flags & CREATE_AREA_DONT_WAIT) != 0) ? 0 : 100000 /* 
100ms*/);
+
+               status = addressSpace->InsertArea(area, size, 
addressRestrictions,
+                       allocationFlags, _virtualAddress);

I wonder if that can really do all that much.
When you enter that function (map_backing_store()), you'll not only need to have the cache locked, but also the address space.

The TODO comment was a bit sparse, but what exactly was not working in the backend at the time?

Bye,
   Axel.

Other related posts: