Whatever China does has to somehow forward their desire to further become part of the larger trading world and gain more influence. They will push it, but they can't go overboard.
OTOH, Kim is already isolated, so he can do whatever he wants.
1) The mindset of the Chinese leadership has indeed changed since the Cultural Revolution ended (about 30 years ago). They look for global dominance but are aiming to do it with economic might in hand. China doesn't believe it has achieved enough economic power to take on the US yet.
2) With the above 'assumption', China wouldn't want a nuclear Korean peninsula because it becomes a volatile playground for all powers. Given that Pyongyang is not too far from Beijing, its a risk China is running to let this comedy continue. I am sure they will reign in Kim before the 2008 Olympics if he survives that long. Atleast they'll keep him gagged for a whole 6 months before.
3) There is a risk of nuclearization of Japan, S. Korea and Taiwan that is UNACCEPTABLE to the Chinese. IF the Chinese act quickly, it will only be to address this eventuality.
4) Iran and North Korea, if allowed to continue, will threaten the Russians and the Chinese a lot more than they will threaten the Americans. It will be their own Afghanistan, so to speak. Just like the Mujahideen bit the hands that created them (read the US and Pakistan), these guys will turn around to bite the Ruskies and the Chicoms.
5) As much as talks will not achieve anything, if America sits down with N. Korea along with a shandow presence of S. Korea and Japan, it might be able to arm-twist Kim into doing things their way. It is clear that Kim is ronery, and his Chicom masters have 'deserted' him. I think its a good time to say "Come to Daddy". This last point of course is an opinion and the experts on the thread will know better if such an idea will work.