LAST FALL, WHEN television station KNME in Albuquerque first broadcast a program called "Doing Time," a modest number of documentary viewers may have been moved by what they saw and heard about conditions in the state penitentiary at Santa Fe. But how much of a public or official reaction did it generate? Only now -- after a barbaric riot that has left more than 40 inmates dead and countless others injured in the smoldering ruins of the prison buildings -- does a whole country take notice. And how long will this attention span last?

With the exception of the inmates' relatives, most people probably prefer to turn away from the horrors of New Mexico. But what were these inmates trying to tell people last summer? In interviews rebroadcast Monday evening on the MacNeil/Lehrer Report (WETA), inmates and guards spoke graphically about the hell of incarceration in overcrowded, understaffed, poorly serviced, unsanitary and insecure facilities: "You just almost give up. You either let the hostilities out or you suppress them to the place where you go bananas, right?" "You have to really fight hard to find a reason to stay alive." "Get high today and to hell with tomorrow."

New Mexico's state penitentiary may be an extreme case of all the classic ills of these huge warrens -- drugs, monotony, racial animosities, sexual marauding, personal vendettas and intense hatred of informers. But these conditions are neither new nor exclusive. One need look no further than Maryland or Virginia, where corrections officials are all too aware of their bulging prison populations -- and of the desperate need to examine alternatives to incarceration for non-dangerous prisoners. Remember the mass outbreak at Jessup, Md., last summer? Or the riots at the old D.C. Jail?

Riots are no remedy -- and the perpetrators of the horrors in New Mexico defy mercy. But until state and local legislators -- and their consitituents -- start paying more attention to the terribly imperfect and too often totally ineffective ways in which they deal with lawbreakers, the threat of these barbaric outbreaks will always be there.