Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752596AbbH2M45 (ORCPT ); Sat, 29 Aug 2015 08:56:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46202 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751965AbbH2M44 (ORCPT ); Sat, 29 Aug 2015 08:56:56 -0400 Date: Sat, 29 Aug 2015 14:54:21 +0200 From: Oleg Nesterov To: Ingo Molnar Cc: Linus Torvalds , Eric Dumazet , Al Viro , "linux-kernel@vger.kernel.org" , Andrew Morton , Thomas Gleixner , Maciej =?utf-8?Q?=C5=BBenczykowski?= Subject: Re: [PATCH] task_work: remove fifo ordering guarantee Message-ID: <20150829125421.GB14973@redhat.com> References: <1440816150.8932.123.camel@edumazet-glaptop2.roam.corp.google.com> <20150829092219.GA8916@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150829092219.GA8916@gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 672 Lines: 18 On 08/29, Ingo Molnar wrote: > > So I'm wondering, is there any strong reason why we couldn't use a double linked > list and still do FIFO and remove that silly linear list walking hack? This will obviously enlarge callback_head, and it is often embedded. But this is minor. If we use a double linked list we can't do task_work_add() lockless. So we will need another spinlock_t in task_struct. We can't use pi_lock. Oleg. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/