I think that the new behavior at zero (documented anywhere?) is a discontinuity. There should be a separate setting for mlocking code pages.
Swap is useful even if you have plenty of RAM. It's better to swap out a cold file-backed page and use that page for cache instead than to pin that cold page in memory for no reason.