From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de ([195.135.220.15]:34328 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751171AbdJDWq0 (ORCPT ); Wed, 4 Oct 2017 18:46:26 -0400 Date: Wed, 4 Oct 2017 15:46:12 -0700 From: Davidlohr Bueso To: Waiman Long Cc: Alexander Viro , Jan Kara , Jeff Layton , "J. Bruce Fields" , Tejun Heo , Christoph Lameter , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Ingo Molnar , Peter Zijlstra , Andi Kleen , Dave Chinner , Boqun Feng Subject: Re: [PATCH v6 6/6] lib/dlock-list: Provide IRQ-safe APIs Message-ID: <20171004224612.GF13815@linux-80c1.suse> References: <1507152007-28753-1-git-send-email-longman@redhat.com> <1507152007-28753-7-git-send-email-longman@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <1507152007-28753-7-git-send-email-longman@redhat.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, 04 Oct 2017, Waiman Long wrote: >To enable the use of dlock-list in an interrupt handler, the following >new APIs are provided for a irqsafe dlock-list: > > - void dlock_list_unlock_irqsafe(struct dlock_list_iter *) > - void dlock_list_relock_irqsafe(struct dlock_list_iter *) > - void dlock_list_add_irqsafe(struct dlock_list_node *, > struct dlock_list_head *); > - void dlock_lists_add_irqsafe(struct dlock_list_node *, > struct dlock_list_heads *) > - void dlock_lists_del_irqsafe(struct dlock_list_node *) > >New macros for irqsafe dlock-list: > > - dlist_for_each_entry_irqsafe(pos, iter, member) > - dlist_for_each_entry_safe_irqsafe(pos, n, iter, member) Instead of adding more calls to the api, could we not just use the irqsave/restore as part of the regular api? Thanks, Davidlohr