From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f45.google.com (mail-pa0-f45.google.com [209.85.220.45]) by kanga.kvack.org (Postfix) with ESMTP id 70FF56B0032 for ; Fri, 27 Mar 2015 02:34:44 -0400 (EDT) Received: by padcy3 with SMTP id cy3so86584756pad.3 for ; Thu, 26 Mar 2015 23:34:44 -0700 (PDT) Received: from mail.sfc.wide.ad.jp (shonan.sfc.wide.ad.jp. [2001:200:0:8803::53]) by mx.google.com with ESMTPS id fs8si1538848pdb.76.2015.03.26.23.34.43 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Mar 2015 23:34:43 -0700 (PDT) Date: Fri, 27 Mar 2015 15:34:40 +0900 Message-ID: From: Hajime Tazaki Subject: Re: [RFC PATCH 00/11] an introduction of library operating system for Linux (LibOS) In-Reply-To: <5514560A.7040707@nod.at> References: <1427202642-1716-1-git-send-email-tazaki@sfc.wide.ad.jp> <551164ED.5000907@nod.at> <55117565.6080002@nod.at> <55118277.5070909@nod.at> <55133BAF.30301@nod.at> <5514560A.7040707@nod.at> MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: To: richard@nod.at Cc: linux-arch@vger.kernel.org, arnd@arndb.de, corbet@lwn.net, cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, netdev@vger.kernel.org, linux-mm@kvack.org, jdike@addtoit.com, rusty@rustcorp.com.au, mathieu.lacage@gmail.com Hi Richard, At Thu, 26 Mar 2015 19:55:06 +0100, Richard Weinberger wrote: > >> feeling that "lib" is the wrong name. > >> It has not much do to with an architecture. > > > > could you care to elaborate your feeling more explicitly ? > > > > what is an architecture here and what is _not_ an > > architecture ? > > is UML an architecture in your sense (probably yes, but why)? > > UML is an architecture as it binds the whole kernel to a computer > interface. Linux userspace in that case. > > > and what is arch/lib missing for an architecture ? > > Your arch/lib does not bind the Linux kernel to an interface. > It takes some part of Linux and duplicates kernel core subsystems > to make that part work on its own. > For example arch/lib contains a stub implementation of core VFS > functions like register_filesystem(). > Also it does not seem to use the kernel scheduler, you have your own. the scheduler is the part of which a library user (NUSE or DCE) should implement. > This also infers that arch/lib will be broken most of the time as > every time the networking stack references a new symbol it > has to be duplicated into arch/lib. > > But this does not mean that your idea is bad, all I want to say that > I'm not sure whether arch/lib is the right approach. > Maybe Arnd has a better idea. one way to avoid the duplication is: to put our libos-specific implementation to the kernel core subsystem. Maybe this will introduce a bunch of #ifdefs (ifdef CONFIG_LIB) into cores, which I don't know it's okay or not. for example, add_timer() is implemented in arch/lib/timer.c while in kernel/time/timer.c in kernel core. # [04/11] to [08/11] of my RFC patches are these parts. We've been implemented these stubs (we call 'kernel glue code') into arch/lib because 1) we were in out-of-tree and 2) this won't disturb kernel core. OTOH, [03/11] (and [09/11] and [10/11]) is an original part of libos, which probably have no conflict (in terms of the concept) to the others. I'm still thinking arch/lib is an appropriate place. > >> You don't implement an architecture, you take some part of Linux > >> (the networking stack) and create stubs around it to make it work. > >> That means that we'd also have to duplicate kernel functions into > >> arch/lib to keep it running. > > > > again, the above same questions. > > > > it (arch/lib) is a hardware-independent architecture which > > provides necessary features to the remainder of kernel code, > > isn't it ? > > The stuff in arch/ is the code to glue the kernel to > a specific piece of hardware. > Your code does something between. You duplicate kernel core features > to make a specific piece of code work in userland. indeed, 'something between' would be an appropriate word. thank you for your comment. -- Hajime -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org