Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030591AbXB0Mqb (ORCPT ); Tue, 27 Feb 2007 07:46:31 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1030601AbXB0Mqb (ORCPT ); Tue, 27 Feb 2007 07:46:31 -0500 Received: from relay.2ka.mipt.ru ([194.85.82.65]:35970 "EHLO 2ka.mipt.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030591AbXB0Mqa (ORCPT ); Tue, 27 Feb 2007 07:46:30 -0500 Date: Tue, 27 Feb 2007 15:40:27 +0300 From: Evgeniy Polyakov To: Ingo Molnar Cc: Theodore Tso , Linus Torvalds , Ulrich Drepper , linux-kernel@vger.kernel.org, Arjan van de Ven , Christoph Hellwig , Andrew Morton , Alan Cox , Zach Brown , "David S. Miller" , Suparna Bhattacharya , Davide Libenzi , Jens Axboe , Thomas Gleixner Subject: Re: [patch 00/13] Syslets, "Threadlets", generic AIO support, v3 Message-ID: <20070227124026.GB20235@2ka.mipt.ru> References: <20070222074044.GA4158@elte.hu> <20070222113148.GA3781@2ka.mipt.ru> <20070226172812.GC22454@2ka.mipt.ru> <20070226195416.GA11188@elte.hu> <20070227102832.GC23170@2ka.mipt.ru> <20070227115221.GJ8154@thunk.org> <20070227121116.GA31597@2ka.mipt.ru> <20070227121328.GA18565@elte.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20070227121328.GA18565@elte.hu> User-Agent: Mutt/1.5.9i X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (2ka.mipt.ru [0.0.0.0]); Tue, 27 Feb 2007 15:41:54 +0300 (MSK) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1947 Lines: 49 On Tue, Feb 27, 2007 at 01:13:28PM +0100, Ingo Molnar (mingo@elte.hu) wrote: > > * Evgeniy Polyakov wrote: > > > > [...] But it is true that for most kernel programmers, threaded > > > programming is much easier to understand, and we need to engineer > > > the kernel for what will be maintainable for the majority of the > > > kernel development community. > > > > I understand that - and I totally agree. > > why did you then write, just one mail ago, the exact opposite: > > > And debugging state machine code has exactly the same complexity as > > debugging multi-threading code - if not less... Because thread machinery is much more complex than event one - just compare amount of code in scheduler and the whole kevent - kernel/sched.c has about the same size as the whole kevent :) > the kernel /IS/ multi-threaded code. > > which statement of yours is also patently, absurdly untrue. > Multithreaded code is harder to debug than process based code, but it is > still a breeze compared to complex state-machines... It seems that we are talking about different levels. Model I propose to use in userspace - very simple events mostly about completion of the request - they are simple to use and simple to debug. It can be slightly more hard to debug, than the simplest threading model (one thread - one logical entity, which whould never work with others) though. >From userspace point of view it is about the same complexity to check why event is not marked as ready, or why some thread never got scheduled... And we do not get into account possible synchronization methods needed to run multithreaded code without problems. > Ingo -- Evgeniy Polyakov - 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/