When desires are big (like the desire for truth, or knowledge) the are no longer detrimental. It is the small desires that give rise to restlessness, and restlessness is something that brings pain.