Based on the following passage from The Encyclopedia of Mythology by Arthur Cotterrell (and other common versions of the myth), I don't believe that Sisyphus knew in advance the futility of his efforts:
"Finally, Zeus lost patience and condemned Sisyphus to Tartarus to pay for his lifelong impiety. For the rest of eternity he had to roll a block of stone to the top of a hill only to see it roll back again as it reached the crest."
"Finally, Zeus lost patience and condemned Sisyphus to Tartarus to pay for his lifelong impiety. For the rest of eternity he had to roll a block of stone to the top of a hill only to see it roll back again as it reached the crest."
I believe that the entire point of the punishment was to trick him to believe that he was going to succeed. This is purely speculative, since no version of the myth I read answers this question explicitly. Moreover, I don't think that he had any choice in the matter, it wasn't his desire to roll the boulder. It resembles Hell in Christianity, those who suffer don't have their say in the matter.