linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hajime Tazaki <tazaki@sfc.wide.ad.jp>
To: pebolle@tiscali.nl
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,
	richard@nod.at, rusty@rustcorp.com.au, upa@haeena.net,
	christoph.paasch@gmail.com, mathieu.lacage@gmail.com,
	libos-nuse@googlegroups.com
Subject: Re: [RFC PATCH v3 09/10] lib: libos build scripts and documentation
Date: Wed, 22 Apr 2015 14:33:55 +0900	[thread overview]
Message-ID: <m2618opvzw.wl@sfc.wide.ad.jp> (raw)
In-Reply-To: <1429562587.14597.80.camel@x220>


Hi Paul,

many thanks for your review. 

all the fixes will be on next patchset.
my comments are below.

At Mon, 20 Apr 2015 22:43:07 +0200,
Paul Bolle wrote:
> 
> Some random observations while I'm still trying to wrap my head around
> all this (which might take quite some time).
> 
> On Sun, 2015-04-19 at 22:28 +0900, Hajime Tazaki wrote:
> > --- /dev/null
> > +++ b/arch/lib/Kconfig
> > @@ -0,0 +1,124 @@
> > +menuconfig LIB
> > +       bool "LibOS-specific options"
> > +       def_bool n
> 
> This is the start of the Kconfig parse for lib. (That would basically
> still be true even if you didn't set KBUILD_KCONFIG, see below.) So why
> not do something like all arches do:
> 
> config LIB
> 	def_bool y
> 	select [...]
> 
> Ie, why would someone want to build for ARCH=lib and still not set LIB?

agreed. fixed.

> > +config EXPERIMENTAL
> > +	def_bool y
> 
> Unneeded: removed treewide in, I think, 2014.

thanks. fixed.

> > +config MMU
> > +        def_bool n
> 
> Add empty line.
> 
> > +config FPU
> > +        def_bool n
> 
> Ditto.

both are fixed.

> > +config KTIME_SCALAR
> > +       def_bool y
> 
> This one is unused.

deleted.

> > +config GENERIC_BUG
> > +	def_bool y
> > +	depends on BUG
> 
> Add empty line here.

fixed.

> > +config GENERIC_FIND_NEXT_BIT
> > +	def_bool y
> 
> This one is unused too.

deleted.

> > +config SLIB
> > +       def_bool y
> 
> You've also added SLIB to init/Kconfig in 02/10. But "make ARCH=lib
> *config" will never visit init/Kconfig, will it? And, apparently, none
> of SL[AOU]B are wanted for lib. So I think the entry for config SLIB in
> that file can be dropped (as other arches will never see it because it
> depends on LIB).
> 
> (Note that I haven't actually looked into all the Kconfig entries added
> above. Perhaps I might do that. But I'm pretty sure most of the time all
> I can say is: "I have no idea why this entry defaults to $VALUE".)

I intended to SLIB be a generic one, not only for the
arch/lib, as we discussed during v2 patch. 

but, you're right: for the moment, no one uses SLIB, we
don't visit init/Kconfig, I dropped config SLIB entry from
init/Kconfig.

> > +source "net/Kconfig"
> > +
> > +source "drivers/base/Kconfig"
> > +
> > +source "crypto/Kconfig"
> > +
> > +source "lib/Kconfig"
> > +
> > +
> 
> Trailing empty lines.

deleted. thanks.

> > diff --git a/arch/lib/Makefile b/arch/lib/Makefile
> > new file mode 100644
> > index 0000000..d8a0bf9
> > --- /dev/null
> > +++ b/arch/lib/Makefile
> > @@ -0,0 +1,251 @@
> > +ARCH_DIR := arch/lib
> > +SRCDIR=$(dir $(firstword $(MAKEFILE_LIST)))
> 
> Do you use SRCDIR?

no. deleted the line.

> > +DCE_TESTDIR=$(srctree)/tools/testing/libos/
> > +KBUILD_KCONFIG := arch/$(ARCH)/Kconfig
> 
> I think you copied this from arch/um/Makefile. But arch/um/ is, well,
> special. Why should lib not start the kconfig parse in the file named
> Kconfig? And if you want to start in arch/lib/Kconfig, it would be nice
> to add a mainmenu (just like arch/x86/um/Kconfig does).

right now, 'lib' only wants to eat arch/lib/Kconfig so that
build and link its wanted files instead of configurable one.

so I beilive arch/lib is also special as arch/um is.

I added a mainmenu btw. thanks.

> (I don't read Makefilese well enough to understand the rest of this
> file. I think it's scary.)

indeed. thank you again to review the cryptic files..

> When I did
>     make ARCH=lib menuconfig
> 
> I saw (among other things):
>     arch/lib/Makefile.print:41: target `trace/' given more than once in the same rule.
>     arch/lib/Makefile.print:41: target `trace/' given more than once in the same rule.
>     arch/lib/Makefile.print:41: target `trace/' given more than once in the same rule.
>     arch/lib/Makefile.print:41: target `trace/' given more than once in the same rule.
>     arch/lib/Makefile.print:41: target `lzo/' given more than once in the same rule.
(snip)
>     arch/lib/Makefile.print:41: target `ppp/' given more than once in the same rule.
>     arch/lib/Makefile.print:41: target `slip/' given more than once in the same rule.
> 
> I have no idea why. Unclean tree?

this was due to inappropriate handling of the internal
directory listing procedure. fixed.

> > +.PHONY : core
> > +.NOTPARALLEL : print $(subdirs) $(final-obj-m)
> 
> > --- /dev/null
> > +++ b/arch/lib/processor.mk
> > @@ -0,0 +1,7 @@
> > +PROCESSOR=$(shell uname -m)
> > +PROCESSOR_x86_64=64
> > +PROCESSOR_i686=32
> > +PROCESSOR_i586=32
> > +PROCESSOR_i386=32
> > +PROCESSOR_i486=32
> > +PROCESSOR_SIZE=$(PROCESSOR_$(PROCESSOR))
> 
> The rest of the tree appears to use BITS instead of PROCESSOR_SIZE. And
> I do hope there's a cleaner way for lib to set PROCESSOR_SIZE than this.

the variable PROCESSOR_SIZE is only used by
arch/lib/Makefile, with the following lines.

> +ifeq ($(PROCESSOR_SIZE),64)
> +CFLAGS+= -DCONFIG_64BIT
> +endif

Thus it eventually uses CONFIG_64BIT.

I think a cleaner way is to follow the way of arch/um, like
below: I deleted processor.mk and PROCESSOR_SIZE variable.

ifeq ($(SUBARCH),x86)
  ifeq ($(shell uname -m),x86_64)
	CFLAGS+= -DCONFIG_64BIT
endif

though it's not able to cross-compile yet.

again, thank you so much.
I'll be back very soon (v4 patch).

-- Hajime

  reply	other threads:[~2015-04-22  5:34 UTC|newest]

Thread overview: 117+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-24 13:10 [RFC PATCH 00/11] an introduction of library operating system for Linux (LibOS) Hajime Tazaki
2015-03-24 13:10 ` [RFC PATCH 01/11] sysctl: make some functions unstatic to access by arch/lib Hajime Tazaki
2015-03-24 16:13   ` Joe Perches
2015-03-25 15:31     ` Hajime Tazaki
2015-03-24 13:10 ` [RFC PATCH 02/11] slab: add private memory allocator header for arch/lib Hajime Tazaki
2015-03-24 13:10 ` [RFC PATCH 03/11] lib: public headers and API implementations for userspace programs Hajime Tazaki
2015-03-24 13:10 ` [RFC PATCH 04/11] lib: memory management (kernel glue code) Hajime Tazaki
2015-03-24 13:10 ` [RFC PATCH 05/11] lib: time handling " Hajime Tazaki
2015-03-24 13:10 ` [RFC PATCH 06/11] lib: context and scheduling " Hajime Tazaki
2015-03-24 13:10 ` [RFC PATCH 07/11] lib: sysctl " Hajime Tazaki
2015-03-24 13:10 ` [RFC PATCH 08/11] lib: other kernel glue layer code Hajime Tazaki
2015-03-29 18:17   ` Richard Weinberger
2015-03-31  7:36     ` Hajime Tazaki
2015-04-03  1:24       ` Hajime Tazaki
2015-03-24 13:10 ` [RFC PATCH 09/11] lib: asm-generic files Hajime Tazaki
2015-03-24 13:10 ` [RFC PATCH 10/11] lib: libos build scripts and documentation Hajime Tazaki
2015-03-24 13:10 ` [RFC PATCH 11/11] lib: tools used for test scripts Hajime Tazaki
2015-03-24 13:21 ` [RFC PATCH 00/11] an introduction of library operating system for Linux (LibOS) Richard Weinberger
2015-03-24 14:25   ` Hajime Tazaki
2015-03-24 14:32     ` Richard Weinberger
2015-03-24 15:24       ` Hajime Tazaki
2015-03-24 15:27         ` Richard Weinberger
2015-03-25 14:48           ` Hajime Tazaki
2015-03-25 22:50             ` Richard Weinberger
2015-03-26 16:24               ` Hajime Tazaki
2015-03-26 18:55                 ` Richard Weinberger
2015-03-27  3:31                   ` Rusty Russell
2015-03-27  3:49                     ` Geert Uytterhoeven
2015-03-27  5:52                       ` Richard Weinberger
2015-03-27  6:05                     ` Hajime Tazaki
2015-03-27  6:34                   ` Hajime Tazaki
2015-03-27  9:21                     ` Richard Weinberger
2015-03-27 15:17                       ` Antti Kantee
2015-03-28 21:17                         ` Richard Weinberger
2015-03-29 15:36                           ` Hajime Tazaki
2015-03-29 16:47                             ` Richard Weinberger
2015-03-29 16:59                           ` Antti Kantee
2015-03-29 18:05                             ` Richard Weinberger
2015-03-29 15:06                       ` Hajime Tazaki
2015-03-30  6:41                         ` Richard Weinberger
2015-03-31  7:47                           ` Hajime Tazaki
2015-04-09  8:36                             ` Richard Weinberger
2015-04-14  3:20                               ` Hajime Tazaki
2015-04-01  1:29                         ` Rusty Russell
2015-04-03  1:43                           ` Hajime Tazaki
2015-04-07  1:25                             ` Rusty Russell
2015-04-17  9:36 ` [RFC PATCH v2 " Hajime Tazaki
2015-04-17  9:36   ` [RFC PATCH v2 01/11] sysctl: make some functions unstatic to access by arch/lib Hajime Tazaki
2015-04-17  9:36   ` [RFC PATCH v2 02/11] slab: add private memory allocator header for arch/lib Hajime Tazaki
2015-04-17 12:17     ` Christoph Lameter
2015-04-17 12:44       ` Richard Weinberger
2015-04-17 15:02         ` Hajime Tazaki
2015-04-17 15:08           ` Richard Weinberger
2015-04-17 15:27             ` Hajime Tazaki
2015-04-17 22:26             ` Christoph Lameter
2015-04-17  9:36   ` [RFC PATCH v2 03/11] lib: public headers and API implementations for userspace programs Hajime Tazaki
2015-04-17  9:36   ` [RFC PATCH v2 04/11] lib: memory management (kernel glue code) Hajime Tazaki
2015-04-17  9:36   ` [RFC PATCH v2 05/11] lib: time handling " Hajime Tazaki
2015-04-17  9:36   ` [RFC PATCH v2 06/11] lib: context and scheduling " Hajime Tazaki
2015-04-17  9:36   ` [RFC PATCH v2 07/11] lib: sysctl " Hajime Tazaki
2015-04-17  9:36   ` [RFC PATCH v2 08/11] lib: other kernel glue layer code Hajime Tazaki
2015-04-17  9:36   ` [RFC PATCH v2 09/11] lib: asm-generic files Hajime Tazaki
2015-04-17  9:36   ` [RFC PATCH v2 10/11] lib: libos build scripts and documentation Hajime Tazaki
2015-04-17  9:36   ` [RFC PATCH v2 11/11] lib: tools used for test scripts Hajime Tazaki
2015-04-19 13:28   ` [RFC PATCH v3 00/10] an introduction of library operating system for Linux (LibOS) Hajime Tazaki
2015-04-19 13:28     ` [RFC PATCH v3 01/10] sysctl: make some functions unstatic to access by arch/lib Hajime Tazaki
2015-04-19 13:28     ` [RFC PATCH v3 02/10] slab: add SLIB (Library memory allocator) for arch/lib Hajime Tazaki
2015-04-19 13:28     ` [RFC PATCH v3 03/10] lib: public headers and API implementations for userspace programs Hajime Tazaki
2015-04-19 13:28     ` [RFC PATCH v3 04/10] lib: time handling (kernel glue code) Hajime Tazaki
2015-04-19 13:28     ` [RFC PATCH v3 05/10] lib: context and scheduling functions (kernel glue code) for libos Hajime Tazaki
2015-04-19 13:28     ` [RFC PATCH v3 06/10] lib: sysctl handling (kernel glue code) Hajime Tazaki
2015-04-19 13:28     ` [RFC PATCH v3 07/10] lib: other kernel glue layer code Hajime Tazaki
2015-04-19 13:28     ` [RFC PATCH v3 08/10] lib: auxially files for auto-generated asm-generic files of libos Hajime Tazaki
2015-04-19 13:28     ` [RFC PATCH v3 09/10] lib: libos build scripts and documentation Hajime Tazaki
2015-04-20 20:43       ` Paul Bolle
2015-04-22  5:33         ` Hajime Tazaki [this message]
2015-04-19 13:28     ` [RFC PATCH v3 10/10] lib: tools used for test scripts Hajime Tazaki
2015-04-24  7:40     ` [RFC PATCH v3 00/10] an introduction of library operating system for Linux (LibOS) Richard Weinberger
2015-04-24  8:22       ` Hajime Tazaki
2015-04-24  8:59         ` Richard Weinberger
2015-04-24  9:50           ` Hajime Tazaki
2015-04-27  3:00     ` [PATCH v4 00/10] an introduction of Linux library operating system (LibOS) Hajime Tazaki
2015-04-27  3:00       ` [PATCH v4 01/10] sysctl: make some functions unstatic to access by arch/lib Hajime Tazaki
2015-04-27  3:00       ` [PATCH v4 02/10] slab: add SLIB (Library memory allocator) for arch/lib Hajime Tazaki
2015-04-27  3:00       ` [PATCH v4 03/10] lib: public headers and API implementations for userspace programs Hajime Tazaki
2015-04-27  3:00       ` [PATCH v4 04/10] lib: time handling (kernel glue code) Hajime Tazaki
2015-04-27  3:00       ` [PATCH v4 05/10] lib: context and scheduling functions (kernel glue code) for libos Hajime Tazaki
2015-04-27  3:00       ` [PATCH v4 06/10] lib: sysctl handling (kernel glue code) Hajime Tazaki
2015-04-27  3:00       ` [PATCH v4 07/10] lib: other kernel glue layer code Hajime Tazaki
2015-04-27  3:00       ` [PATCH v4 08/10] lib: auxially files for auto-generated asm-generic files of libos Hajime Tazaki
2015-04-27  3:00       ` [PATCH v4 09/10] lib: libos build scripts and documentation Hajime Tazaki
2015-04-27  3:00       ` [PATCH v4 10/10] lib: tools used for test scripts Hajime Tazaki
2015-04-27  7:29       ` [PATCH v4 00/10] an introduction of Linux library operating system (LibOS) Richard Weinberger
2015-04-27  7:39         ` Richard Weinberger
2015-04-29 23:16           ` Hajime Tazaki
2015-05-13  5:28       ` [PATCH v5 " Hajime Tazaki
2015-05-13  5:28         ` [PATCH v5 01/10] sysctl: make some functions unstatic to access by arch/lib Hajime Tazaki
2015-05-13  5:28         ` [PATCH v5 02/10] slab: add SLIB (Library memory allocator) for arch/lib Hajime Tazaki
2015-05-13  5:28         ` [PATCH v5 03/10] lib: public headers and API implementations for userspace programs Hajime Tazaki
2015-05-13  5:28         ` [PATCH v5 04/10] lib: time handling (kernel glue code) Hajime Tazaki
2015-05-13  5:28         ` [PATCH v5 05/10] lib: context and scheduling functions (kernel glue code) for libos Hajime Tazaki
2015-05-13  5:28         ` [PATCH v5 06/10] lib: sysctl handling (kernel glue code) Hajime Tazaki
2015-05-13  5:28         ` [PATCH v5 07/10] lib: other kernel glue layer code Hajime Tazaki
2015-05-13  5:28         ` [PATCH v5 08/10] lib: auxiliary files for auto-generated asm-generic files of libos Hajime Tazaki
2015-05-13  5:28         ` [PATCH v5 09/10] lib: libos build scripts and documentation Hajime Tazaki
2015-05-13  5:28         ` [PATCH v5 10/10] lib: tools used for test scripts Hajime Tazaki
2015-09-03 14:16         ` [PATCH v6 00/10] an introduction of Linux library operating system (LibOS) Hajime Tazaki
2015-09-03 14:16           ` [PATCH v6 01/10] sysctl: make some functions unstatic to access by arch/lib Hajime Tazaki
2015-09-03 14:16           ` [PATCH v6 02/10] slab: add SLIB (Library memory allocator) for arch/lib Hajime Tazaki
2015-09-03 14:16           ` [PATCH v6 03/10] lib: public headers and API implementations for userspace programs Hajime Tazaki
2015-09-03 14:16           ` [PATCH v6 04/10] lib: time handling (kernel glue code) Hajime Tazaki
2015-09-03 14:16           ` [PATCH v6 05/10] lib: context and scheduling functions (kernel glue code) for libos Hajime Tazaki
2015-09-03 14:16           ` [PATCH v6 06/10] lib: sysctl handling (kernel glue code) Hajime Tazaki
2015-09-03 14:16           ` [PATCH v6 07/10] lib: other kernel glue layer code Hajime Tazaki
2015-09-03 14:16           ` [PATCH v6 08/10] lib: auxiliary files for auto-generated asm-generic files of libos Hajime Tazaki
2015-09-03 14:16           ` [PATCH v6 09/10] lib: libos build scripts and documentation Hajime Tazaki
2015-09-03 14:16           ` [PATCH v6 10/10] lib: tools used for test scripts Hajime Tazaki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2618opvzw.wl@sfc.wide.ad.jp \
    --to=tazaki@sfc.wide.ad.jp \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=christoph.paasch@gmail.com \
    --cc=cl@linux.com \
    --cc=corbet@lwn.net \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=jdike@addtoit.com \
    --cc=libos-nuse@googlegroups.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mathieu.lacage@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pebolle@tiscali.nl \
    --cc=penberg@kernel.org \
    --cc=richard@nod.at \
    --cc=rientjes@google.com \
    --cc=rusty@rustcorp.com.au \
    --cc=upa@haeena.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).