Functions which are periodic along every geodesic In an effort to understand some geometric rigidity theorems, I am curious about the following: let $(M,g)$ be a complete Riemannian manifold and suppose there is a nonconstant real-valued function on $M$ which has a period of 1 when restricted to any unit-speed geodesic of $M$. Does this place restrictions on $(M,g)$?
My feeling is that the vast majority of manifolds cannot support such a function. The round sphere clearly can.
edit: if I understand correctly- according to the article arxiv.org/abs/1511.07852 of Radeschi and Wilking (Invent. Math. 2017) given by Igor Belegradek in the comments, a theorem of Wadsley (J. Diff. Geom. 1975) shows that, for every Riemannian manifold all of whose geodesics are closed, every function on $M$ satisfies the above condition with some constant period; the theorem is that all lengths of closed geodesics must be multiples of a single number, when $\pi_1(M)$ is finite
 A: If $f\circ \gamma$ has period $1$ for all unit speed geodesics $\gamma:\mathbb{R} \to M$ then in particular $f(x) = f(y)$ whenever $x$ and $y$ are the endpoints of a geodesic segment of length $1$.
This implies that $f(x) = f(y)$ whenever there is a sequence $x_0 = x,x_1,\ldots,x_n = y$ such that $x_i$ and $x_{i+1}$ are the endpoints of a segment of length $1$ for $i = 0,\ldots,n-1$.  Following Sunada call such a sequence a $1$-geodesic chain.
If any two points can be joined by a $1$-geodesic chain then $f$ would have to be constant.  In a couple of papers of Sunada (e.g. Theorem C from "Mean value theorems and ergodicity of certain random walks" Compositio Mathematica 1983) conditions under which any two points can be joined by a $1$-geodesic chain are given.
His results imply that, in order for a non-constant $f$ to exist, there must be a point $o \in M$ such that for any unit speed geodesic with $\gamma(0) = x$ one has that $\gamma(n)$ is conjugate to $x$ along $\gamma$ for all integer $n$.
This implies in particular that $M$ is compact and its fundamental group is finite (since the condition above passes to the universal covering space as well).
For surfaces this shows (Theorem G in the aforementioned paper by Sunada) that $M$ would have to be either the sphere or the projective plane with a metric such that all geodesics from $o$ have period $2$.
