In addition to maintaining normal levels of oxygen in the atmosphere, photosynthesis is the source of energy for nearly all life on earth, either directly, through primary production, or indirectly, as the ultimate source of the energy in their food, the exceptions being chemoautotrophs that live in rocks or around deep sea hydrothermal vents.