any unlevel areas would show, unless its very bad.
If so, you may have floor joists that are the culprit and to fix the problem, maybe the joists need correcting, but that would mean tearing up the downstairs ceiling. So, that is probably out.
Then I would address the floor itself. There are two methods that you could do. One is to apply floor levelor to the valleys and trowel them out. I am not too sure how this would work on a upstairs floor. When the floor gives, the levelor would break.
The best idea would be to apply the floor levelor to the valleys and then apply another sub flooring out of ply wood. Screw this down thoroughly and then carpet over that. I would not add a too thick piece of flooring as this will increase the weight of the flooring on the already weak joists.
I am saying weak joists because if the flooring is that unlevel, the joists are somehow effecting the problem.
This will give yo something to think about as I am sure you will get some better ideas.