Hello, On Mon, Jul 3, 2023 at 3:02 AM Samuel Thibault <samuel.thiba...@gnu.org> wrote: > I applied this, *but* I see: > > * Fields in this structure are locked either by the lock on the > * object that the page belongs to (O) or by the lock on the page > * queues (P). [Some fields require that both locks be held to > * change that field; holding either lock is sufficient to read.] > > That's not going to work at all with bitfields...
Great point. (But I don't think this patch makes it any worse.) > We do need to sort this out by separating bitfields that are not > protected the same way, otherwise it's no wonder if SMP fails oddly. This is really interesting, because Mach surely was developed for SMP from the start ("an OS for a parallel computer" was an explicit design goal, and M in Mach stands for multi-processor), so it must have worked for them. But indeed I see that they have separated the bitfields in XNU, so we should too. Hopefully without blowing the struct size back up. Any feedback/comments on the rest of the series? Does forward entry coalescing work for you? Any issues / noticeable performance effects? Sergey