Near-linear dynamics in KdV with periodic boundary conditions