Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965175AbbGVNwm (ORCPT ); Wed, 22 Jul 2015 09:52:42 -0400 Received: from mail-yk0-f174.google.com ([209.85.160.174]:32990 "EHLO mail-yk0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965145AbbGVNwk (ORCPT ); Wed, 22 Jul 2015 09:52:40 -0400 Date: Wed, 22 Jul 2015 09:52:37 -0400 From: Tejun Heo To: Baoquan He Cc: cl@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] perpuc: check pcpu_first_chunk and pcpu_reserved_chunk to avoid handling them twice Message-ID: <20150722135237.GJ15934@mtj.duckdns.org> References: <1437404130-5188-1-git-send-email-bhe@redhat.com> <1437404130-5188-2-git-send-email-bhe@redhat.com> <20150721152840.GG15934@mtj.duckdns.org> <20150722000357.GA1834@dhcp-17-102.nay.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150722000357.GA1834@dhcp-17-102.nay.redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1058 Lines: 32 Hello, On Wed, Jul 22, 2015 at 08:03:57AM +0800, Baoquan He wrote: > Yes, dyn_size can't be zero. But in pcpu_setup_first_chunk(), the local > variable dyn_size could be zero caused by below code: > > if (ai->reserved_size) { > schunk->free_size = ai->reserved_size; > pcpu_reserved_chunk = schunk; > pcpu_reserved_chunk_limit = ai->static_size + > ai->reserved_size; > } else { > schunk->free_size = dyn_size; > dyn_size = 0; /* dynamic area covered > */ > } > > So if no reserved_size dyn_size is assigned to zero, and is checked to > see if dchunk need be created in below code: Hmmm... but then pcpu_reserved_chunk is NULL so there still is no duplicate on the list, no? Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/