From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755113AbcITPDl (ORCPT ); Tue, 20 Sep 2016 11:03:41 -0400 Received: from mx2.suse.de ([195.135.220.15]:50505 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755064AbcITPDi (ORCPT ); Tue, 20 Sep 2016 11:03:38 -0400 Date: Tue, 20 Sep 2016 08:03:28 -0700 From: Davidlohr Bueso To: Manfred Spraul Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH -next v2 0/5] ipc/sem: semop(2) improvements Message-ID: <20160920150328.GA21438@linux-80c1.suse> References: <1474225896-10066-1-git-send-email-dave@stgolabs.net> <50042b05-2e9c-8483-710c-0f0eafc658e0@colorfullife.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <50042b05-2e9c-8483-710c-0f0eafc658e0@colorfullife.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 19 Sep 2016, Manfred Spraul wrote: >On 09/18/2016 09:11 PM, Davidlohr Bueso wrote: >>Davidlohr Bueso (5): >> ipc/sem: do not call wake_sem_queue_do() prematurely >The only patch that I don't like. >Especially: patch 2 of the series removes the wake_up_q from the >function epilogue. >So only the code duplication (additional instances of >rcu_read_unlock()) remains, I don't see any advantages. > >> ipc/sem: rework task wakeups >Acked Thanks. >> ipc/sem: optimize perform_atomic_semop() >I'm still thinking about it. >Code duplication is evil, but perhaps it is the best solution. > >What I don't like is the hardcoded "< BITS_PER_LONG". >At least: >- (1 << sop->sem_num) >+ (1 << (sop->sem_num%BITS_PER_LONG)) Yeah, I'll send v3 for that. >> ipc/sem: explicitly inline check_restart >Do we really need that? Isn't that the compiler's task? >Especially since the compiler is already doing it correctly. Yes, I mentioned in the changelog that the compiler does it and this is merely explicit. That said I see no harm in it, I guess whatever akpm says. >> ipc/sem: use proper list api for pending_list wakeups >Acked Thanks, Davidlohr