Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp579358pxa; Thu, 27 Aug 2020 09:57:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUwIsDPyf9objpOIc1yATpgjRt9U9SYsijOK+rVLPk+ij0/QXxetJR/IaxJvx+xOn9+cdJ X-Received: by 2002:a17:906:c304:: with SMTP id s4mr22585498ejz.360.1598547444933; Thu, 27 Aug 2020 09:57:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598547444; cv=none; d=google.com; s=arc-20160816; b=cXIYLMbYSOuhGK4NrFeh+qrCb/eZyR3QVC409/sXlrQMtwszDe5AXvwamkwrdEX+ni Wr8JqHonZRHoov3ovQYuPQg1Ie7PZApBLGN+BsM4Qq7Pecv1CilHWF6JrBFnw2FxBMLH YGe6sqS3ujolRfR3SHpxlkoF1Hv+I+acVwRdzKtCQd6/GOyX+yWln10GMNFZ5it/c+1/ Dnb7gBBJ7S+Jnn783JpYwPztn6ZohZDdSekmAQUHkSAD8GliqwnCvTY0oAEjHmQ7zkm6 DUChMZ4lGOKuiN7EdIb7vSTAXekNfaSVySxDio4D/kMNvxrTng6zgcM0JqUNKpcNSqIr T6tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=SSi0PB6QbtM1yaYhFUwqIMkjIT1n3Q2GuDY4HbN7Kf0=; b=yzxn+2MDaNL29hEhGKuYIEPKFX4uF8jikknoGlpLD3JXjTdajApjVuwqqGJJFCOCSK E+rRhka0CIcS0n3t7FsciG1FPXncPDcCXpKpN9gn8HMus7P1cytn1VHP1OXk8XVQhSgt 66qrS+dMOQcDwjT1QeK6aMxs0iZtpl7Six7cZ9osxg9z/aVUy0PfNN6AoDbV7Tz4frjw i4sXL5DQ4mu+wP0dRdrXz4VNb9GGMP7iJHmm0U69qFHflozIhaJlPqb2KyTsc91kOpbv hAIEiiaD4/yOwcxYb/g5vsfx5z0D2veoQ7OlUIvYTyjedHV2V8eiRhpdgMmz2Rgx+j1V WUnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=vEHF2QGs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z18si2012756edq.290.2020.08.27.09.57.01; Thu, 27 Aug 2020 09:57:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=vEHF2QGs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726851AbgH0Q42 (ORCPT + 99 others); Thu, 27 Aug 2020 12:56:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726197AbgH0Q42 (ORCPT ); Thu, 27 Aug 2020 12:56:28 -0400 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BF85C061264; Thu, 27 Aug 2020 09:56:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=SSi0PB6QbtM1yaYhFUwqIMkjIT1n3Q2GuDY4HbN7Kf0=; b=vEHF2QGsi2DpyHej0MA5sep7Ur C1S7/f467o3G2ZmbX8x+/9E5sZAebKOacqzgM8MmipjMRGOOqDFepAB/D0jC5C5MdQqI0GAO41OCI /19RpLSJmY1OZig5zNLCmElzmIPx0bQd/p9QESlVb+JMBBl5BmfuGJ1s0A6ul9tIwaNTwhBR3rtjR nl/eKTc3ih3ot2uYnODMT2fiD1IZw0OOVBqUte38vQwJt451IYELo8Ei6XxJUe0aOWDvFlsiA6OLv VfKkym3Iz3XRrAfHMFaiWjNn+pJMiGjTCIrOYXD7TBoRINzWXRXyxmKZcWJnxXgx4DJRoGQA8CUki xkXwWD2g==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kBLC3-00075E-NI; Thu, 27 Aug 2020 16:56:07 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 15792301A66; Thu, 27 Aug 2020 18:56:05 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id C21B52C42F07A; Thu, 27 Aug 2020 18:56:05 +0200 (CEST) Date: Thu, 27 Aug 2020 18:56:05 +0200 From: peterz@infradead.org To: Cameron Cc: linux-kernel@vger.kernel.org, mhiramat@kernel.org, Eddy_Wu@trendmicro.com, x86@kernel.org, davem@davemloft.net, rostedt@goodmis.org, naveen.n.rao@linux.ibm.com, anil.s.keshavamurthy@intel.com, linux-arch@vger.kernel.org, oleg@redhat.com, will@kernel.org, paulmck@kernel.org Subject: Re: [RFC][PATCH 6/7] freelist: Lock less freelist Message-ID: <20200827165605.GL1362448@hirez.programming.kicks-ass.net> References: <20200827161237.889877377@infradead.org> <20200827161754.535381269@infradead.org> <20200827163755.GK1362448@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 27, 2020 at 12:49:20PM -0400, Cameron wrote: > For what it's worth, the freelist.h code seems to be a faithful adaptation > of my original blog post code. Didn't think it would end up in the Linux > kernel one day :-) Hehe, I ran into the traditional ABA problem for the lockless stack and asked google, your blog came up. I'll try and actually think about it a little when the current (virtual) conference is over. Are you Ok with the License I put on it, GPLv2 or BDS-2 ? > I'm just wondering if the assumption that "nodes are never freed until > after the free list is destroyed" will hold true in the intended use case? It does, the nodes are only deleted once the whole freelist object is discarded.