Ioffe-Regel criterion and resistivity of metals