Received: by 10.192.165.148 with SMTP id m20csp771478imm; Fri, 4 May 2018 20:52:36 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrHqgMn4+OGvzcPdiFbNCTJiSj7EV11t7eUfilAsxUl4IVhjScd3UOWUc6Ch1ruzlt6zbLu X-Received: by 2002:a65:604f:: with SMTP id b15-v6mr10454356pgv.452.1525492356028; Fri, 04 May 2018 20:52:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525492355; cv=none; d=google.com; s=arc-20160816; b=MsN5tdzLf/UmCpnQ1+8hc+h1HIfxeKXqSXKY2OhFp32ZJ0wnPbytTkeau5Wijx0JBK gKO0VAsrNkyyVXHo0lZ2XDVRZ5opY9SeQwd6TPG+FxCiv2pBpiQHkPoPwdMmO+3LnrTh BnqmV/SrWDncVtG2zMH77KKbMaeXKOpcIMxZO4FK7O8nwdYkNrdR19FBp5ApmcKkdJAq uRETfuFeIKxSPQ/6QGrpNJAGmYmSDMYMdyt/ByDqaBk2qOu893x0D2Zxpc5unZSHgI6w f7jK1ypjlNesI4Zt4bL79jG5ormFqpcNimdXInFP5rkjHrvsEsjxDPeD0uvjLoLzAlb8 R1xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=lhu62cHyimEN65PC9pm4X8oPjbKoWd8dJ5Un2H23ybo=; b=Vkxvb3Fm8+fHgZtedH+YpqcV9Wbr4fgbRpuOrju0hj7BALiE52A5uNB9AKCEMSRyWc hCpYBYcwJYYnJdWIq7kWKcIlMKccx/dYsvSY15NqNxC4BbrONHj1Auguyiq/R13INFCC p029uADvltCNBP3WImscN84ZB7WMIVVIw90orA2L+X5c5u7VtEpMoqknUmLJWBNc5iB0 3FsOqR1NxBPz/f4Mlsy0MrmQdojcQYEEw7Rf2i+p4l7zt1D+ZvcrvAdh3C9uJHR6kal1 il3X/AgHy1hIoLxMoScpJc/ka4nLNiUTXbdmKBuuJ2KDcSBn775MbpDFIHFZRs2zCTDH p4OA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=o6irlS81; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 82si3908092pfs.40.2018.05.04.20.52.21; Fri, 04 May 2018 20:52:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=o6irlS81; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751853AbeEEDv5 (ORCPT + 99 others); Fri, 4 May 2018 23:51:57 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:34206 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751563AbeEEDv4 (ORCPT ); Fri, 4 May 2018 23:51:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=lhu62cHyimEN65PC9pm4X8oPjbKoWd8dJ5Un2H23ybo=; b=o6irlS81fQkcpZtvjvdXabcp5 HQXS/c4szm7l1O7hzu+/gL6yl3CDCEoC+g4aE58Fqc8jvffAksV1trqGdYW6I05JzcYDc3lIFNdp4 703jJ6j6rOoiEdZrVAHmKiDy+tVOuhrO1Jz1ykuKx8EVuuef33u0hJID+zpf8qJsTxgX1I+qcS3EH LNYbda2dZV6vnodxrNz6RcueBDRVdzR36p/rVBoxEmdBEZKzkR49KLCJDOGSBUxul5xZwYXGhASFN iLAJgs2rEZ/0ACw+O1DkOm/4tt8zQ+iCEfO6YVbOtHBl0puBVcxo000V0ftHQcTcYxY7Nn9/q6gwU WzX1fUqFw==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fEoEk-0004CQ-Dk; Sat, 05 May 2018 03:51:54 +0000 Date: Fri, 4 May 2018 20:51:54 -0700 From: Matthew Wilcox To: Andrew Morton Cc: Sebastian Andrzej Siewior , linux-kernel@vger.kernel.org, tglx@linutronix.de, Nicholas Bellinger , Shaohua Li , Kent Overstreet , Jens Axboe Subject: Re: [PATCH] percpu_ida: Use _irqsave() instead of local_irq_save() + spin_lock Message-ID: <20180505035154.GB20495@bombadil.infradead.org> References: <20180504153218.7301-1-bigeasy@linutronix.de> <20180504162216.ae91654b68eddafe38df7d7f@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180504162216.ae91654b68eddafe38df7d7f@linux-foundation.org> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 04, 2018 at 04:22:16PM -0700, Andrew Morton wrote: > I'm feeling a bit hostile toward lib/percpu_ida.c in general ;) It has > very few users and seems rather complicated (what's with that > schedule() in percpu_ida_alloc?). I'm suspecting and hoping that if > someone can figure out what the requirements were, this could all be > zapped and reimplemented using something else which we already have. Note that I have no code in percpu_ida ... it's quite different from the regular IDA. But I have noticed the stunning similarity between the percpu_ida and the code in lib/sbitmap.c. I have no idea which one is better, but they're essentially doing the same thing.