When I lived in Beijing, I watched the air pollution indices like a hawk -- if the number got too high, I just rode very slowly. I have a Respro pollution filter mask, but don't like wearing it unless the pollution is simply ridiculous (or during sandstorms) -- otherwise, I find it uncomfortable. In Shanghai, I have so far not bothered with any specific anti-pollution measures.