Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752102AbdI0Vvb (ORCPT ); Wed, 27 Sep 2017 17:51:31 -0400 Received: from mail-qt0-f194.google.com ([209.85.216.194]:37734 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751905AbdI0Vv3 (ORCPT ); Wed, 27 Sep 2017 17:51:29 -0400 X-Google-Smtp-Source: AOwi7QATXM3XGiI3dRoF0ZJy96+WKl174LdZE24eZiqrMkdaprRyVLLRjHKsfRtbhVCCztATFIISSg== Date: Wed, 27 Sep 2017 14:51:25 -0700 From: Tejun Heo To: Dennis Zhou Cc: Christoph Lameter , Luis Henriques , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] percpu: fix iteration to prevent skipping over block Message-ID: <20170927215125.GB15129@devbig577.frc2.facebook.com> References: <1506548100-31247-1-git-send-email-dennisszhou@gmail.com> <1506548100-31247-3-git-send-email-dennisszhou@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1506548100-31247-3-git-send-email-dennisszhou@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1050 Lines: 25 On Wed, Sep 27, 2017 at 04:35:00PM -0500, Dennis Zhou wrote: > The iterator functions pcpu_next_md_free_region and > pcpu_next_fit_region use the block offset to determine if they have > checked the area in the prior iteration. However, this causes an issue > when the block offset is greater than subsequent block contig hints. If > within the iterator it moves to check subsequent blocks, it may fail in > the second predicate due to the block offset not being cleared. Thus, > this causes the allocator to skip over blocks leading to false failures > when allocating from the reserved chunk. While this happens in the > general case as well, it will only fail if it cannot allocate a new > chunk. > > This patch resets the block offset to 0 to pass the second predicate > when checking subseqent blocks within the iterator function. > > Signed-off-by: Dennis Zhou > Reported-by: Luis Henriques Luis, can you please verify that this fixes the allocaiton failure you were seeing? Thanks. -- tejun