Problem Given a Turing machine $M$ which has known runtime ${O}(g(n))$ with respect to input length $n$, is the runtime of $M$ ${O}(f(n))$?
Is the above problem decidable for some nontrivial pairs of $g$ and $f$?A solution is trivial if $g(n) \in O(f(n))$.
This is related to the problem Are runtime bounds in P decidable? (answer: no). One can derive from Viola's answer that if $g(n)$, $f(n)\not \in O(n)$ and $f(n)\not \in O(g(n))$ then the problem is undecidable.
The requirement that $g(n)$, $f(n)\not \in O(n)$ is because the $M'$ in Viola's proof need $O(n)$ time to find its input size. Thus Viola's proof could not work when $g(n)$ is linear.