From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f71.google.com (mail-it0-f71.google.com [209.85.214.71]) by kanga.kvack.org (Postfix) with ESMTP id B5AE96B04A1 for ; Fri, 18 Aug 2017 16:05:11 -0400 (EDT) Received: by mail-it0-f71.google.com with SMTP id 190so91956414itx.7 for ; Fri, 18 Aug 2017 13:05:11 -0700 (PDT) Received: from mga04.intel.com (mga04.intel.com. [192.55.52.120]) by mx.google.com with ESMTPS id o3si4298790pld.417.2017.08.18.13.05.10 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Aug 2017 13:05:10 -0700 (PDT) Date: Fri, 18 Aug 2017 13:05:10 -0700 From: Andi Kleen Subject: Re: [PATCH 1/2] sched/wait: Break up long wake list walk Message-ID: <20170818200510.GQ28715@tassilo.jf.intel.com> References: <37D7C6CF3E00A74B8858931C1DB2F07753786CE9@SHSMSX103.ccr.corp.intel.com> <37D7C6CF3E00A74B8858931C1DB2F0775378761B@SHSMSX103.ccr.corp.intel.com> <20170818122339.24grcbzyhnzmr4qw@techsingularity.net> <37D7C6CF3E00A74B8858931C1DB2F077537879BB@SHSMSX103.ccr.corp.intel.com> <20170818144622.oabozle26hasg5yo@techsingularity.net> <37D7C6CF3E00A74B8858931C1DB2F07753787AE4@SHSMSX103.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: Linus Torvalds Cc: "Liang, Kan" , Mel Gorman , Mel Gorman , "Kirill A. Shutemov" , Tim Chen , Peter Zijlstra , Ingo Molnar , Andrew Morton , Johannes Weiner , Jan Kara , linux-mm , Linux Kernel Mailing List > I was really hoping that we'd root-cause this and have a solution (and > then apply Tim's patch as a "belt and suspenders" kind of thing), but One thing I wanted to point out is that Tim's patch seems to make several schedule intensive micro benchmarks faster. I think what's happening is that it allows more parallelism during wakeup: Normally it's like CPU 1 CPU 2 CPU 3 ..... LOCK wake up tasks on other CPUs woken up woken up UNLOCK SPIN on waitq lock SPIN on waitq lock LOCK remove waitq UNLOCk LOCK remove waitq UNLOCK So everything is serialized. But with the bookmark patch the other CPUs can go through the "remove waitq" sequence earlier because they have a chance to get a go at the lock and do it in parallel with the main wakeup. Tim used a 64 task threshold for the bookmark. That may be actually too large. It may even be faster to use a shorter one. So I think it's more than a bandaid, but likely a useful performance improvement even for less extreme wait queues. -Andi -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org