  We formulate diagrammatic rules for many-body perturbation theory which uses
Kohn-Sham (KS) Green's functions as basic propagators. The diagram technique
allows to study the properties of the dynamic nonlocal exchange-correlation
(xc) kernel $f_{xc}$. We show that the spatial non-locality of $f_{xc}$ is
strongly frequency-dependent. In particular, in extended systems the
non-locality range diverges at the excitation energies. This divergency is
related to the discontinuity of the xc potential.
