From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF0E7C43219 for ; Fri, 3 May 2019 22:39:00 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7359B206DF for ; Fri, 3 May 2019 22:39:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7359B206DF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=vt.edu Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.91) (envelope-from ) id 1hMgpP-00012r-LQ; Fri, 03 May 2019 18:38:51 -0400 Received: from omr2.cc.ipv6.vt.edu ([2607:b400:92:8400:0:33:fb76:806e] helo=omr2.cc.vt.edu) by shelob.surriel.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1hMgpN-00012k-N7 for kernelnewbies@kernelnewbies.org; Fri, 03 May 2019 18:38:49 -0400 Received: from mr3.cc.vt.edu (mr3.cc.vt.edu [IPv6:2607:b400:92:8500:0:7f:b804:6b0a]) by omr2.cc.vt.edu (8.14.4/8.14.4) with ESMTP id x43MckV6005574 for ; Fri, 3 May 2019 18:38:47 -0400 Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by mr3.cc.vt.edu (8.14.7/8.14.7) with ESMTP id x43Mcf8j002937 for ; Fri, 3 May 2019 18:38:46 -0400 Received: by mail-qt1-f198.google.com with SMTP id y10so716125qti.22 for ; Fri, 03 May 2019 15:38:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to:references :mime-version:content-transfer-encoding:date:message-id; bh=3TCj0mxLO+HjLrXwwEAydaF5ubCH8pK27z+m5MS4VBw=; b=PBasw3Bsw4+9mFiqdeopgFHLKbJQ89vpgHZA8x8MmWrROlvfz+XUsYPCEO4ghxmmGo o+66d6L4MNMBLcW1B4QG3fa4+GpRCgtJWqIE6UbBiU4ojhKkbM6ISsdFISzTSJRGCbes NKHeFJbAeBlXEw2rz+mTqrYJzYXOGlRh8tTvXmfxuPkMRTTcGXYsMcf3IolfNBpVp3aL eyQ8OuOXK2qfEE7vOUJjewt7e7ozHFimH9JOvSmuOdEUvyVvmSxSsupZJieE+WDSpz9R pvexLi/4HgvRb/0UXkN/U/CrWY0ls2F7ei8S3RVFlN/8gwAmhxDanK7WBX+XgENfcPtv XpDg== X-Gm-Message-State: APjAAAXni89o9nu1WqbSJxeIh0UHOMZAtZximwVRQbMq87/O6oyU9RIA 4HoqV1Q/5+tfE2qABGZhC0wLyonhdUoHxnOb3TEjYxJsvH6wlfvFQKLB3C5xBf5WKoMII+gLQb7 Dci5FN9wSX/KXwks0lpOzFQUaNxczYRy+TDn65yY= X-Received: by 2002:ac8:2d15:: with SMTP id n21mr10556514qta.21.1556923121675; Fri, 03 May 2019 15:38:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqzJ29S9wxAFRfjGqrF7o38wuvXZp8G9Tv6/WCehcR47/Tco+Xs/gsM44SXKaUD6Qjv8OOLJvQ== X-Received: by 2002:ac8:2d15:: with SMTP id n21mr10556502qta.21.1556923121423; Fri, 03 May 2019 15:38:41 -0700 (PDT) Received: from turing-police ([2601:5c0:c001:4341:5952:f06b:5958:9b7c]) by smtp.gmail.com with ESMTPSA id n58sm2619549qtf.22.2019.05.03.15.38.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 May 2019 15:38:40 -0700 (PDT) From: "Valdis Kl=?utf-8?Q?=c4=93?=tnieks" X-Google-Original-From: "Valdis Kl=?utf-8?Q?=c4=93?=tnieks" X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7+dev To: Probir Roy Subject: Re: radix_tree_next_chunk: redundant search for next slot in hole In-Reply-To: References: Mime-Version: 1.0 Date: Fri, 03 May 2019 18:38:39 -0400 Message-ID: <6489.1556923119@turing-police> Cc: willy@linux.intel.com, kernelnewbies@kernelnewbies.org X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============6700424185685787973==" Errors-To: kernelnewbies-bounces@kernelnewbies.org --===============6700424185685787973== Content-Type: multipart/signed; boundary="==_Exmh_1556923118_11736P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit --==_Exmh_1556923118_11736P Content-Type: text/plain; charset=us-ascii On Fri, 03 May 2019 16:03:46 -0500, Probir Roy said: > While searching for next slot in a hole, it walks through the same > slots over n over. How did you determine this? > while (++offset < RADIX_TREE_MAP_SIZE) { > void *slot = rcu_dereference_raw( /* redundant slot walk */ > node->slots[offset]); > if (slot) > break; > } Looks to me like the ++offset will walk through each potential slot once, and break out if it finds one. I haven't looked at the code closely, perhaps what you're seeing is repeated scan/merge/rescan behavior? Often, compacting a data structure requires multiple passes. --==_Exmh_1556923118_11736P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Comment: Exmh version 2.9.0 11/07/2018 iQIVAwUBXMzC7gdmEQWDXROgAQKn/Q/+NLy0p2bu/KgHMGGyoDm0vhwnvB7bcJXT W+E/ueF34TLLcxRa5B5EwwJIHNhzmrUw9CnPJmtbOq4040khz6s3yBpfZY8m51Tg l+u8D5XhqoJ1KPLcusWkk5bAIOs56nEWi04Exks/CJ2g6/2yz+kyVc9rRTDN7s7L 0+zN/eZlmxEx8UU9Tqrl6Hnd2ahK9Q38BAwFOqqhe8SbzPOg1m3pWlNn3LTnL63r o1TLCstQVtxy0eoy80hvtMgAxs7JmdatrpU+A4WEr380TT9LKZ+5hbdFZhWWwfSD akboBwyIeyvXKu2BmRhHnU4QowYuc+A/9WKwme6CnKULY2aNIlDh7f/4sUt0O3B+ Isc7D75fOT5JtdrMPLGSWnMY7t/c2yTbcOwyW+Tn3mNcT1NoCgZDm/hipuOGi2Wa Xe0tKAqzBBQ2ccq17rQBIrBZmiSOYKD7C5oPsQN6q2YLBW2kC4qnqPjcgbHgzxs5 xnPEfCqeB49dWzsIhW+7FzCOH9yO6ECOo052vYugkpQyspCHSX0hAwXo5nNMpdZQ 3KyuO0u/knryDsDmwgIfgmEuuEiN9/mtSVWuDOeLFyM7EeDjWSw739YYpdUEsGe+ WrW7qt2ESTKcnnEVA4tmm6F+74hDL0EWvy0j3EBzDpwBxepQoIh/QdfsegNdqjWy ffO7fYkaehk= =XT8m -----END PGP SIGNATURE----- --==_Exmh_1556923118_11736P-- --===============6700424185685787973== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies --===============6700424185685787973==--