From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750873AbdDBE3P (ORCPT ); Sun, 2 Apr 2017 00:29:15 -0400 Received: from mout.gmx.net ([212.227.15.15]:61144 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750768AbdDBE3N (ORCPT ); Sun, 2 Apr 2017 00:29:13 -0400 Message-ID: <1491107321.13631.33.camel@gmx.de> Subject: net/sched: latent livelock in dev_deactivate_many() due to yield() usage From: Mike Galbraith To: netdev Cc: LKML , Peter Zijlstra Date: Sun, 02 Apr 2017 06:28:41 +0200 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.16.5 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:wptnpOGHWU9NqOUBtjIXFEMFKt7muzvQJRT4iL8mewhbcbqo9a4 ByXg5cj8xOcX9wWaEe4qPV88kIRs1623gpZv7tWi38Jr2nHXpkDIaaMEuwVBtb1OO5MRITU xmyXt/TFRsLb5kjntSTxn04y5nUBzNW5b+3sV4qp7y6e2JXWv4V7+OFvoGAqjP57VBCRIB5 mN41WXzKQnpNjMnXBpz5A== X-UI-Out-Filterresults: notjunk:1;V01:K0:jRQW3l5nJ0o=:ujxGszGQyntiiZ04fWXHdb 8EjXhSl+NzYGInjYCUHF04H5/rHBMB01LpZ0SKI/mEYsG67Wal+K7y68CPOtSoMVq7tHFb8pm TutY6tco3xNrUEJMPcCVtxv3ehlLBSDgEQdmh55vfc+NQvFCFHfA3SjROXmRLCLk2ibVglMTt Xb14mCO7kxjN/txYuANLqjj4yfgn28S1cf3Vj9gW+PPtFVV2txnaRe+s2OIU2KESurHi+baVJ WjoFr7Uxc2lZXMNH7N7hzzE8YidtD4ijYIfw2dZCNyvBXeytGHI29tnC6U+e6cdCscAzyS+wR kUPNzDwAT3Dmd7R+nuo4sf9DRUpTieE+sdu6iUPzABZ4E7Xh1U9CMrR7XU5wmxZ3GacO3nspH BEq4ZZvH0tZAWOwNjogbHngmhqQIxZzequgM4kTXOW1QPAmQgqR4P094KKJog1sZBuqpDahCG V22tjaa8IGX+jYkatt9KLTjUP91W7oWczrcmBfM/Wh1tGp8YqyDsKvEPoXxMsUbyxnKUT/LHx msyn7FtN8Jff5ijJq+phuHyCiwaRCQciSY6u+bXJXU5+DckR9wQaQb+osJzFAFaCd8H+mnan/ bq+3yHTDdKnHDq0IVQm5qdXwOkLujiY+Mt0Ol7/yuwC/iv5vsNjUfncmrz9eCeNyd6LYWMjA0 4LkyMRNcLCkRWCYp1tIAoFgJM3X+yCnAr2CFL7zQGWjAmql5my6Offj/Ncy6leIdxsbym7GuH 3KiEDRvCMaMg+GzS5tdfg7Ouv8utL+51Vs9h6yzmY2R9DaPr/z22PKrZcwITOjxmfDkma3usG iviIqsZ Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Greetings network wizards, Quoting kernel/sched/core.c: /** * yield - yield the current processor to other threads. * * Do not ever use this function, there's a 99% chance you're doing it wrong. * * The scheduler is at all times free to pick the calling task as the most * eligible task to run, if removing the yield() call from your code breaks * it, its already broken. * * Typical broken usage is: * * while (!event) * yield(); * * where one assumes that yield() will let 'the other' process run that will * make event true. If the current task is a SCHED_FIFO task that will never * happen. Never use yield() as a progress guarantee!! * * If you want to use yield() to wait for something, use wait_event(). * If you want to use yield() to be 'nice' for others, use cond_resched(). * If you still want to use yield(), do not! */ Livelock can be triggered by setting kworkers to SCHED_FIFO, then suspend/resume.. you come back from sleepy-land with a spinning kworker. For whatever reason, I can only do that with an enterprise like config, my standard config refuses to play, but no matter, it's "Typical broken usage". (yield() should be rendered dead) -Mike