318 safe max RPM?

You problem is oil. The stock passages can not feed the engine much past 6500 RPM's in the best conditions. Your crank will suffer for going past this point.

RPM is controlled by the valve springs abilty to keep the valves from bouncing around and the valve train together, not separating, jumping around. Then it would be cam profile.