6. Given the function $f(x)=\left\{\begin{array}{l}|x|, x \leqslant a, \\ x^{2}-4 a x+2 a, x>a .\end{array}\right.$ If there exists a real number $m$, such that the equation $f(x)=m$ has four distinct real roots, then the range of values for $a$ is
A. $a>\frac{1}{7}$
B. $a>\frac{1}{6}$
C. $a>\frac{1}{5}$
D. $a>\frac{1}{4}$
As shown in the figure, since $y=m$ intersects the graph of $y=f(x)$ at four different points, that is, $y=m$ intersects the graphs of $y=|x|$ and $y=x^{2}-4 a x+2 a$ at two different points each, it follows that $a>0$. Since $00\end{array} \Rightarrow \frac{1}{4}<a<\frac{2}{3}\right.$. Therefore, the correct choice is $D$.