I don't understand, sorry, both based on my sketchy knowledge of khash's internals, the multi-fold work, and the fact that if you restore that ky_put_will_resize() check then the PULSE test will start spewing failures very quickly because the keydir isn't properly frozen.

If the put is going to resize the hash, I certainly agree that a freeze is required in order to keep the folders' sorting order stable.  However, this function is doing a mutation, and with a mutation of any kind (if there are any keyfolders) we *must* freeze.  My brain can't think of a reason why you'd have keyfolders != 0 and doing a mutation where you would not want to freeze ... but then again, it's -18F here in Minneapolis today, my brain may be slushy.