I wrote:
Howard Chu writes:
That was to prevent the signal from being lost. Though I suppose it doesn't matter, since the signal would get sent again soon enough.
If it's lost, that'll usually be because memp_trickle() is busily flusing pages. It won't return until it has nothing to do, in which case immediately calling it again won't be very useful.
...unless the doc is inaccurate. __memp_trickle() first computes the number of "buffers" to clear, and then calls __memp_sync_int() to clear them. It does not loop if more dirty pages have arrived during the __memp_sync_int() call. OTOH __memp_sync_int() may be magical enough to do so, I haven't tried to figure out how it works.