The M visa has a duration of a year maximum and can be extended another 180 days in China. Moreover, the M visa allows for 1, 2 or multiple entries. In the latter scenario, you can enter and exit China as much as you please for the length of your visa. Last we heard, at the moment the M visa with a validity of more than 90 days can only be applied for in Hong Kong (and there’s no guarantee that you’ll actually get it as visas are decided upon on a case by case basis).
American citizens can also apply for a 10 years multi entry M visa (maximum 60 day for each stay).