Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752942AbdHOW4R (ORCPT ); Tue, 15 Aug 2017 18:56:17 -0400 Received: from mail-vk0-f51.google.com ([209.85.213.51]:37775 "EHLO mail-vk0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752381AbdHOW4Q (ORCPT ); Tue, 15 Aug 2017 18:56:16 -0400 MIME-Version: 1.0 In-Reply-To: <20170815224728.GA1373@linux-80c1.suse> References: <84c7f26182b7f4723c0fe3b34ba912a9de92b8b7.1502758114.git.tim.c.chen@linux.intel.com> <20170815022743.GB28715@tassilo.jf.intel.com> <20170815031524.GC28715@tassilo.jf.intel.com> <20170815224728.GA1373@linux-80c1.suse> From: Linus Torvalds Date: Tue, 15 Aug 2017 15:56:14 -0700 X-Google-Sender-Auth: bQH2heJJeC1Wo3w2nCFAGaACJ2Q Message-ID: Subject: Re: [PATCH 1/2] sched/wait: Break up long wake list walk To: Linus Torvalds , Andi Kleen , Tim Chen , Peter Zijlstra , Ingo Molnar , Kan Liang , Andrew Morton , Johannes Weiner , Jan Kara , linux-mm , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1088 Lines: 29 On Tue, Aug 15, 2017 at 3:47 PM, Davidlohr Bueso wrote: > > Or you can always use wake_qs; which exists _exactly_ for the issues you > are running into Except they really don't actually work for this case, exactly because they also simplify away "minor" details like exclusive vs non-exclusive etc. The page wait-queue very much has a mix of "wake all" and "wake one" semantics. But I guess we could have two queues per page hash - one that is wake-once, and one that is wake-all. Which might solve the technical problem. And if somebody then rewrote the swait code to not use the unbelievably broken and misleading naming, it might even be acceptable. But as is, that swait code is broken shit, and absolutely does *not* need new users. We got rid of one user, and the KVM people already admitted that one of the remaining users is broken and doesn't actually want swait at all and should use "wake_up_process()" instead since there is no actual queuing going on. In the meantime, stop peddling crap. That thing really is broken. Linus