Knocking for my car (the one @Archerfish is referencing) was a dry sway bar bushing. I sprayed them all with silicone spray and it fixed it.Do you mean the knocking sound was related to his engine problem? That sounds serious. Keen to know the what exactly were their findings. Thanks anyway.
The other noise, which is what this thread was originally started for...was for something no one was able to diagnose. It happened on everything other Mazda 6 I tried. I am 99% sure it was a loud valve in the strut.
My engine was replaced but it wasn't related to any of this stuff. The car had a dead cylinder (low compression). Happily in a 2020 CX5 Signature now. It's been working wonderfully and I don't regret jumping into this rig at that time. I miss the Mazda 6 seats however as they were much more comfy.