Hi Eliot,

MemoryPolicy deserves its own class (and comments). LowSpaceWatcher is the mechanism of reacting to a low space condition and implements no policy.

I'm basically just trying to clarify the existing and/or prior mechanism, and potentially to get some ancient cruft out of SmalltalkImage. Anything related to policy is still sitting in SmalltalkImage.

But I have to note for the record that the low space watcher does not actually do anything for any configuration I can come up with on my Linux PC. The mechanism works (signal the semaphore and the process reacts with notifier etc), but I can't get the semaphore to be signalled either directly from the VM or as a result of an allocation primitive failure.

Dave

On 2024-02-02 15:24, Eliot Miranda wrote:

David, all,
 
    please do not extract lowSpaceWatcher to a class called LowSpaceWatcher. This would be a *serious* mistake. Instead, extract it to a class called MemoryPolicy.  There is low space, growing & shrinking the heap, and soon enough rate control of the incremental old space collector to manage.

_,,,^..^,,,_ (phone)

On Jan 28, 2024, at 5:19 PM, lewis@mail.msen.com wrote:

I decided to give this idea a try, and I think that it does help with the documentation. Please try loading  System-dtl.1445 from the inbox, then evaluate "HelpBrowser openOn: LowSpaceWatcher". Let me know what you think of it :-)

Dave

On 2024-01-27 18:51, Jaromir Matas wrote:

Hi Dave,

Interesting, I wondered why the low space watcher doesn't have its class :)

best,
Jaromir


On 27-Jan-24 4:53:59 AM, lewis@mail.msen.com wrote:

On 2024-01-26 08:32, Taeumel, Marcel via Squeak-dev wrote:
Hi Jaromir --

What would be a good place to document the current state and intentions about low-space watcher? I mean, what would have helped you in this case?

Best,
Marcel


One way to document the low space watcher might be to turn it into a proper object with
a good class comment.

The low space watcher process is currently attached to a class variable in class
SmalltalkImage. This is reasonable and appropriate, but it would be just as reasonable
to have a LowSpaceWatcher object attached to the class variable, and let the LowSpaceWatcher
own the process and implement methods related for that process. The semaphore and
primitive calls could also move from SmalltalkImage to LowSpaceWatcher.

Class SmalltalkImage has a lot of responsibilities already, so moving the responsibility
for managing low space handling to a new class called LowSpaceWatcher might be a reasonable
thing to do. A happy side effect would be to let this new class serve as documentation for
the intended behavior of the low-space watcher process.

Dave