__ro_after_init is a relatively new annotation, it should be used more often. Particularly things like ops tables are important to be RO protected at runtime if possible. ppc_md comes to mind, but there are lots of others, xive_ops, smp_ops, eeh_ops, etc. They might not all be read-only after init, in some cases code or data could be restructured slightly to make them so if they are close.
__read_mostly was sometimes used for readonly-after-init data, so that could give something to grep for, but it wasn't applied consistently so manual digging will be required.
This has the added benefit of ensuring read-only data doesn't accidentally get stored in frequently written cache lines.
It should really be an ongoing issue that we do as a matter of coding style, but I'll put this in for now because existing code could do with a few passes.
__ro_after_init is a relatively new annotation, it should be used more often. Particularly things like ops tables are important to be RO protected at runtime if possible. ppc_md comes to mind, but there are lots of others, xive_ops, smp_ops, eeh_ops, etc. They might not all be read-only after init, in some cases code or data could be restructured slightly to make them so if they are close.
__read_mostly was sometimes used for readonly-after-init data, so that could give something to grep for, but it wasn't applied consistently so manual digging will be required.
This has the added benefit of ensuring read-only data doesn't accidentally get stored in frequently written cache lines.
It should really be an ongoing issue that we do as a matter of coding style, but I'll put this in for now because existing code could do with a few passes.