Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752994AbdHOTr5 (ORCPT ); Tue, 15 Aug 2017 15:47:57 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:35409 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752956AbdHOTrz (ORCPT ); Tue, 15 Aug 2017 15:47:55 -0400 MIME-Version: 1.0 In-Reply-To: References: <84c7f26182b7f4723c0fe3b34ba912a9de92b8b7.1502758114.git.tim.c.chen@linux.intel.com> <20170815022743.GB28715@tassilo.jf.intel.com> <20170815031524.GC28715@tassilo.jf.intel.com> <0b7b6132-a374-9636-53f9-c2e1dcec230f@linux.intel.com> From: Linus Torvalds Date: Tue, 15 Aug 2017 12:47:54 -0700 X-Google-Sender-Auth: MgurdIlFJJPA5OTbCK9mQt-hb8k Message-ID: Subject: Re: [PATCH 1/2] sched/wait: Break up long wake list walk To: Tim Chen Cc: Andi Kleen , 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: 633 Lines: 16 On Tue, Aug 15, 2017 at 12:41 PM, Linus Torvalds wrote: > > So if we have unnecessarily collisions because we have waiters looking > at different bits of the same page, we could just hash in the bit > number that we're waiting for too. Oh, nope, we can't do that, because we only have one "PageWaters" bit per page, and it is shared across all bits we're waiting for on that page. So collisions between different bits on the same page are inevitable, and we just need to make sure the hash table is big enough that we don't get unnecessary collisions between different pages. Linus