P-orderings of noncommutative rings