Optical phase locking is a key technique in homodyne coherent optical communication, coherent optical detection, and active coherent laser beam combination. In these applications, environmental temperature variation and mechanical vibration would affect the accuracy of phase locking, or even cause losing lock. These disturbances are generally equivalent to introducing phase jitter, phase step, frequency ramp, and frequency step in the loop. A frequency discrimination and control subloop is introduced to improve the frequency acquisition, and the tracking performance is studied experimentally. The loop can track phase step in 0.2 ms, and precisely track ±π/2 sine phase jitter for jittering frequency lower than 1 kHz. For frequency ramp, the residual phase error is unaffected for ramping rates slower than 40 MHz/s. The frequency discrimination and control subloop makes the loop lock quickly under a frequency step larger than the pull-in frequency. The mean tracking time is 31 ms for a 1 MHz frequency step. The maximum trackable frequency step is around 160 MHz. Continuous or step variation of phase and frequency could be tracked by the loop with the frequency discrimination and control subloop.