Repository navigation
Conversation
|
While preparing slides for the last workshop, I also noticed that only one of the stage4 files is ever used. The stagesort ping-pong is between one stage4 file, and the main sort file. So also remove the unused file handle. |
9cca600 to
69726c5
Compare
|
At the moment, the warning to the user that a sub-buffer stage sort has occurred is printed a single time. Printing it per-term is too much spam, but a single time is probably not prominent enough in the log file. What is a better balance? Once per module? Once per expression per module? Once per expression per thread per module? |
69726c5 to
2a4d634
Compare
2a4d634 to
4ac01d6
Compare
|
The new third commit resolves buffer size warnings in the new tests. It can manifest as a TFORM "performance regression" in particular cases. For example, currently in the mincer test of form-bench, we request 32 filepatches. When running with 12 workers, we called AllocSort in threads.c with I think it is nonetheless OK to make this change. I want to work towards having no unexpected silent internal buffer-resizing, so that it is more clear what the user's buffer size settings are doing. |
For a long time, Stage4 sorting in the sub-buffers (function arguments, dollar variables, term environments) has been forbidden due to crashes. Resolve this by moving the Stage4 file handles into the sorting struct; every sort has its own files. File-to-file based sorting on a per-term basis will be horrible for performance so print a Warning for the user. But FORM will not simply terminate during a potentially long-running program, when the going gets tough.
To maximise use of large+small buffers for caching file patches during sorting, FORM used to update SortIOSize relect the maximum possible cache size. This had the effect of also making the output "PObuffer" rather large. Confusingly, also setting FilePatches smaller could sometimes cause an increased LargeSize alloc for TFORM workers. Decouple these sizes: now the PObuffer is sized according to the user's SortIOSize (and at least MaxTermSize), and when reading file patches we share the large+small buffer space between the current number of active patches (which might be less than file patches: in this case the per-patch cache size is larger than before).
4ac01d6 to
105f3a8
Compare
For a long time, Stage4 sorting in the sub-buffers (function arguments, dollar variables, term environments) has been forbidden due to crashes.
Resolve this by moving the Stage4 file handles into the sorting struct; every sort has its own files.
File-to-file based sorting on a per-term basis will be horrible for performance so print a Warning for the user. But FORM will not simply terminate during a potentially long-running program, when the going gets tough.
This resolves #211 and #215
The fix is basically the same deal as the "nearly stage 4" problem I fixed in f09853d