From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Return-Path: Date: Tue, 27 Feb 2018 12:29:38 -0800 From: Omar Sandoval To: Tejun Heo Cc: Jens Axboe , linux-block@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH RFC] sbitmap: Use lock/unlock atomic bitops Message-ID: <20180227202938.GA23026@vader.DHCP.thefacebook.com> References: <20180218130506.GW695913@devbig577.frc2.facebook.com> <20180226221444.GD9157@vader.DHCP.thefacebook.com> <20180227181404.GA24003@devbig577.frc2.facebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20180227181404.GA24003@devbig577.frc2.facebook.com> List-ID: On Tue, Feb 27, 2018 at 10:14:04AM -0800, Tejun Heo wrote: > Hello, Omar. > > On Mon, Feb 26, 2018 at 02:14:44PM -0800, Omar Sandoval wrote: > > > wake_index = atomic_read(&sbq->wake_index); > > > for (i = 0; i < SBQ_WAIT_QUEUES; i++) { > > > struct sbq_wait_state *ws = &sbq->ws[wake_index]; > > > > So I think we want a patch for the test_and_set_bit_lock() and > > clear_bit_unlock(), but the rest should stay as-is. > > Yeah, that makes sense to me. Would you be interested in updating the > patch? Yup, I'll send it up. Thanks, Tejun!