mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: David Howells <dhowells@redhat.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	john stultz <johnstul@us.ibm.com>, Adrian Bunk <bunk@stusta.de>,
	Andrew Morton <akpm@osdl.org>,
	Arjan van de Ven <arjan@linux.intel.com>,
	linux-kernel@vger.kernel.org, Jeff Garzik <jeff@garzik.org>,
	netdev@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] FRV: do_gettimeofday() should no longer use tickadj
Date: Thu, 07 Sep 2006 14:34:35 +0100	[thread overview]
Message-ID: <4922.1157636075@warthog.cambridge.redhat.com> (raw)
In-Reply-To: <20060907102621.GC4125@elte.hu>

Ingo Molnar <mingo@elte.hu> wrote:

> > So, again, why _should_ I use the generic IRQ stuff? [...]
> 
> To have shared code between architectures?

That's reasonable as far as it goes, the algorithms are similar per-arch, but
the PICs are quite ofter quite different.  My FRV board here has three very
different ones, none of them compatible with anything else as far as I know.

> To make generic API updates easier for all of us?

That's reasonable.

> To have less cruft in interrupt.h?

That's specious.  The whole point of having arch-specific code is to support
arch-specific stuff.

> To not having to add last-minute patches to v2.6.18 because some arch
> defines its own IRQ prototypes and a difficult generic feature like irqtrace
> breaks?

Specious again.  If whoever it was made the changes got them right in the
first place, then it wouldn't have required a last minute patch for the
LOCKDEP=n case now would it?

If you're going to insist on the genirq stuff being used, than you should take
CONFIG_GENERIC_HARDIRQS away and force everyone else to move to what you've
decided they should use, right?

> To get new IRQ subsystem features for free like preemptible irqs, irqpoll or
> SHIRQ debugging?

That's reasonable, but you don't get necessarily get features for "free" when
you add up the cost of having support there for them.  The features appear for
the subscribed arches automatically, and so do the costs.

> hm, could you take a look at why that difference happens? Do you make 
> use of __do_IRQ()?

I did say I used it.  In fact, as far as I can tell, I have to use it
recursively.  There doesn't seem to be any other way in that's correct.

> Do you make use of all the various flow handlers that are offered in
> handle.c?

Some of them.

> Could you #ifdef out all the functions that are unused? The kernel build
> process doesnt remove them and i havent (yet) put them into a library.

I could get away with commenting out:

	no_action()
	set_irq_wake()
	can_request_irq()
	set_irq_type()
	set_irq_data()
	set_irq_chip_data()
	handle_simple_irq()
	handle_fasteio_irq()
	bits of handle_irq_name() corresponding to the previous two

This results in a small shrinkage of text and a slight increase in the amount
of data used:

	   text    data     bss     dec     hex filename
	1993023   77908  166964 2237895  2225c7 vmlinux [before]
	1991407   77912  166964 2236283  221f7b vmlinux [after]
	---------------------------------------
	   1616      -4       0    1612

The increase in data size is slightly puzzling, but may have something to do
with there being fewer strings in handle_irq_name().  The text decrease is
about 12% of the unmodified total:

	   text    data     bss     dec     hex filename
	  10908    3272      12   14192    3770 kernel/irq/built-in.o
	   1548      64       4    1616     650 arch/frv/kernel/irq.o
	    744     192       0     936     3a8 arch/frv/kernel/irq-mb93091.o
	---------------------------------------
	  13200    3528      16   16744         total

> the same "why should we share code" argument could be made for the VFS too.

That argument doesn't really follow.  We only have one interrupt system in the
kernel, but we have lots of different filesystems.

> Sharing code has a (small) price most of the time, but it's also very much
> worth it. I think the size increases you are seeing are artificial

Artificial in what manner?  I haven't added extra code to genirq to make it
look bad or anything like that.

> and most of it is not caused by the indirections. If they were caused by the
> indirections i'd probably agree with you.

I think most of the size increase is due to the core genirq function set being
large, not the indirections themselves.  There aren't many indirections
implemented in the core set.

The indirected functions exist in the arch code for the most part, and where
they are implemented they are generally very small.  In FRV's case, one lot in
arch/frv/kernel/irq.c for the CPU and one lot in arch/frv/kernel/irq-mb93091.c
or similar for the on-motherboard FPGA.

> if your argument were true every arch should run its whole Linux kernel 
> in arch/frv, with zero sharing with anyone else.

Not really.  eCos manages this more efficiently than Linux, with generally
fewer indirections through the use of macros and inline functions.

At some point you do have to draw a line and do common stuff.  The VFS is
definitely in the common region.  It has little need of arch-specific stuff in
there, and that that it does is quite readily encapsulated in inline functions
where it has little effect on the space.  I'm not entirely convinced that this
applies to interrupt handling though.  That is at the basic level very
arch-dependent.

> There's always a lot of 'unnecessary' stuff all around the kernel that is
> just a hindrance for FRV.

Or any other platform, embedded or otherwise, that doesn't want it.  A lot of
it I can disable - the block layer now, for instance - but some of it I can't
(like interrupt handling).

> In reality what makes us stronger is to work together.  I dont for a minute
> say that we should overdo code sharing

So who defines what is "overdone"?  You seem to have decided that you do.

> - if it's not possible then it must not be forced, but just the pure fact of
> "more indirections" or "what does this bring me _now_" isnt a good enough
> reason i believe - it simply makes _future_ changes easier.

And makes the kernel larger and slower and makes it consume more stack space
and less easy for the compiler to optimise.

David

  parent reply	other threads:[~2006-09-07 13:37 UTC|newest]

Thread overview: 138+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-01  8:58 2.6.18-rc5-mm1 Andrew Morton
2006-09-01  9:53 ` 2.6.18-rc5-mm1 Manuel Lauss
2006-09-01 10:44 ` 2.6.18-rc5-mm1 Grant Wilson
2006-09-01 13:50   ` [-mm patch] drivers/md/Kconfig: fix BLOCK dependency Adrian Bunk
2006-09-01 14:15   ` David Howells
2006-09-01 14:26     ` Jens Axboe
2006-09-01 16:00 ` 2.6.18-rc5-mm1: drivers/infiniband/hw/amso1100/c2.c compile error Adrian Bunk
2006-09-01 17:13   ` Andrew Morton
2006-09-01 17:34     ` Roland Dreier
2006-09-01 18:23       ` Andrew Morton
2006-09-01 19:53         ` Roland Dreier
2006-09-01 20:04           ` Andrew Morton
2006-09-01 20:20             ` Tom Tucker
2006-09-01 20:43             ` Russell King
2006-09-01 20:54               ` Roland Dreier
2006-09-01 21:01                 ` [openib-general] " Bryan O'Sullivan
2006-09-01 20:59               ` Andrew Morton
2006-09-01 21:05                 ` Roland Dreier
2006-09-01 21:26                   ` Andrew Morton
2006-09-01 22:42                     ` Roland Dreier
2006-09-01 20:51             ` Roland Dreier
2006-09-01 21:03               ` Andrew Morton
2006-09-01 20:45           ` [openib-general] " Bryan O'Sullivan
2006-09-01 20:59             ` Roland Dreier
2006-09-01 21:03               ` Bryan O'Sullivan
2006-09-01 16:40 ` 2.6.18-rc5-mm1 Maciej Rutecki
2006-09-05 16:16   ` 2.6.18-rc5-mm1 Bjorn Helgaas
2006-09-06 16:55     ` 2.6.18-rc5-mm1 Maciej Rutecki
2006-09-07  3:08       ` 2.6.18-rc5-mm1 Andrew Morton
2006-09-07 17:33         ` 2.6.18-rc5-mm1 keith mannthey
2006-09-01 19:58 ` [-mm patch] fs/reiser4/: possible cleanups Adrian Bunk
2006-09-01 23:13 ` 2.6.18-rc5-mm1 (IDE resume regression) Rafael J. Wysocki
2006-09-02  0:08   ` Andrew Morton
2006-09-02  1:00 ` 2.6.18-rc5-mm1 Matthias Hentges
2006-09-02  1:30   ` 2.6.18-rc5-mm1 Andrew Morton
     [not found]     ` <44F93EB3.8050500@goop.org>
2006-09-02  8:37       ` 2.6.18-rc5-mm1 Jeremy Fitzhardinge
2006-09-02  8:44         ` 2.6.18-rc5-mm1 Greg KH
2006-09-02  8:47           ` 2.6.18-rc5-mm1 Jeremy Fitzhardinge
2006-09-02  8:52             ` 2.6.18-rc5-mm1 Greg KH
2006-09-02  9:36               ` 2.6.18-rc5-mm1 Jeremy Fitzhardinge
2006-09-02  9:38                 ` 2.6.18-rc5-mm1 Jeff Garzik
2006-09-02  9:47                   ` 2.6.18-rc5-mm1 Jeremy Fitzhardinge
2006-09-02  9:56                   ` 2.6.18-rc5-mm1 Jeremy Fitzhardinge
2006-09-09 23:47           ` 2.6.18-rc5-mm1 Jeremy Fitzhardinge
2006-09-10 16:24             ` 2.6.18-rc5-mm1 Matthias Hentges
2006-09-02  1:06 ` 2.6.18-rc5-mm1 Grant Coady
2006-09-02  1:12   ` 2.6.18-rc5-mm1 Dmitry Torokhov
2006-09-02  1:33     ` 2.6.18-rc5-mm1 Dmitry Torokhov
2006-09-02  2:10     ` 2.6.18-rc5-mm1 Grant Coady
2006-09-02  1:39   ` 2.6.18-rc5-mm1 Andrew Morton
2006-09-02  3:51     ` 2.6.18-rc5-mm1 Grant Coady
2006-09-02 20:20       ` 2.6.18-rc5-mm1 Grant Coady
2006-09-02 20:38         ` "VGER BF report:.." ? Matti Aarnio
2006-09-03 15:06           ` Jan Engelhardt
2006-09-03 19:59             ` Grant Coady
2006-09-02  9:05 ` 2.6.18-rc5-mm1 Philippe Gramoullé
2006-09-02 11:40   ` 2.6.18-rc5-mm1 Stefan Richter
2006-09-02 11:51     ` 2.6.18-rc5-mm1 Philippe Gramoullé
2006-09-03  9:09 ` [2.6.18-rc5-mm1 ACPI] Unknown exception code: 0xFFFFFFEA Mike Galbraith
2006-09-05 16:18   ` Bjorn Helgaas
2006-09-03 17:25 ` 2.6.18-rc5-mm1: sysfs_init() related compile error Adrian Bunk
2006-09-03 22:17 ` 2.6.18-rc5-mm1: MMU=n " Adrian Bunk
2006-09-04  7:44   ` Peter Zijlstra
2006-09-04 15:44     ` Adrian Bunk
2006-09-03 23:34 ` Lost DVD-RW [Was Re: 2.6.18-rc5-mm1] J.A. Magallón
2006-09-04  1:12   ` Andrew Morton
2006-09-04  2:42     ` Tejun Heo
2006-09-04 22:26       ` J.A. Magallón
2006-09-07  9:34         ` Tejun Heo
2006-09-07 11:13           ` J.A. Magallón
2006-09-07 11:32             ` [PATCH libata-dev#upstream-fixes] libata: ignore CFA signature while sanity-checking an ATAPI device Tejun Heo
2006-09-07 20:27               ` Andrew Morton
2006-09-07 21:03                 ` Jeff Garzik
2006-09-08  7:56                   ` Tejun Heo
2006-09-09 14:46           ` Lost DVD-RW [Was Re: 2.6.18-rc5-mm1] Alan Cox
2006-09-04 11:41 ` 2.6.18-rc5-mm1: is_init() parisc compile error Adrian Bunk
2006-09-04 13:48   ` [parisc-linux] " Matthew Wilcox
2006-09-04 18:24     ` [PATCH] Fix conflict with the is_init identifier on parisc Eric W. Biederman
2006-09-04 18:41       ` Adrian Bunk
2006-09-04 19:18       ` Andrew Morton
2006-09-04 17:03 ` [-mm patch] drivers/infiniband/hw/amso1100/: possible cleanups Adrian Bunk
2006-09-04 17:03 ` [-mm patch] make fs/lockd/host.c:nlm_lookup_host() static Adrian Bunk
2006-09-04 17:04 ` 2.6.18-rc5-mm1: ARCH_DISCONTIGMEM_ENABLE=y, SMP=n compile error Adrian Bunk
2006-09-04 19:04   ` Andrew Morton
2006-09-04 19:24     ` Adrian Bunk
2006-09-04 17:04 ` [-mm patch] fix kernel_execve() related compile errors Adrian Bunk
2006-09-04 17:04 ` [-mm patch] lib/ioremap.c must #include <linux/mm.h> Adrian Bunk
2006-09-04 18:41 ` [-mm patch] mm/memory_hotplug.c must #include <linux/cpuset.h> Adrian Bunk
2006-09-04 22:17 ` [-mm patch] arch/m68knommu/kernel/sys_m68k.c must #include <asm/unistd.h> Adrian Bunk
2006-09-05 13:03 ` lockdep oddity Heiko Carstens
2006-09-05 18:12   ` Ingo Molnar
2006-09-05 18:57     ` Hua Zhong
2006-09-05 18:52       ` Ingo Molnar
2006-09-05 19:08     ` Ingo Molnar
2006-09-05 19:37       ` Ingo Molnar
2006-09-06  6:54         ` Heiko Carstens
2006-09-06 10:05           ` Ingo Molnar
2006-09-06  7:20     ` Heiko Carstens
2006-09-06  7:47       ` Andrew Morton
2006-09-06  8:01         ` Heiko Carstens
2006-09-06  8:23           ` Hua Zhong
2006-09-06  8:40             ` Ingo Molnar
2006-09-06 14:19               ` Daniel Walker
2006-09-06 14:29                 ` Heiko Carstens
2006-09-06 14:34                   ` Daniel Walker
2006-09-05 20:07   ` Daniel Walker
2006-09-06  7:18     ` Heiko Carstens
2006-09-06 11:58     ` Heiko Carstens
2006-09-05 13:25 ` 2.6.18-rc5-mm1: {dis,en}able_irq_lockdep_irqrestore compile error Adrian Bunk
2006-09-05 15:21 ` [PATCH] FRV: Fix " David Howells
2006-09-06 12:50   ` Ingo Molnar
2006-09-05 15:27 ` [PATCH] NOMMU: Move the fallback arch_vma_name() to a sensible place David Howells
2006-09-05 15:29 ` [PATCH] NOMMU: Provide page_mkclean() for NOMMU David Howells
2006-09-05 15:31 ` [PATCH] NOMMU: Make lib/ioremap.c conditional David Howells
2006-09-05 15:35 ` [PATCH] FRV: do_gettimeofday() should no longer use tickadj David Howells
2006-09-06  1:46   ` john stultz
2006-09-06  9:27   ` David Howells
2006-09-06  9:43     ` Ingo Molnar
2006-09-06 12:30     ` David Howells
2006-09-06 12:56       ` Ingo Molnar
2006-09-06 14:46       ` David Howells
2006-09-06 23:01         ` Benjamin Herrenschmidt
2006-09-07  9:55         ` David Howells
2006-09-07 10:26           ` Ingo Molnar
2006-09-07 13:34           ` David Howells [this message]
2006-09-07 22:53           ` Benjamin Herrenschmidt
2006-09-08 10:25           ` David Howells
2006-09-08 11:05             ` Benjamin Herrenschmidt
2006-09-08 12:24             ` David Howells
2006-09-08 12:29           ` David Howells
2006-09-11  4:06             ` Benjamin Herrenschmidt
2006-09-09  5:46         ` Ingo Molnar
2006-09-11 10:46         ` David Howells
2006-09-05 16:00 ` 2.6.18-rc5-mm1 dependency on curses devel still there Steve Fox
2006-09-06 23:06 ` [-mm patch] ATA_JMICRON: remove the superfluous ATA dependency Adrian Bunk
2006-09-06 23:07 ` [-mm patch] ACPI_SONY shouldn't default m Adrian Bunk
2006-09-07  3:30   ` Andrew Morton
2006-09-07  4:41     ` Randy.Dunlap

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=4922.1157636075@warthog.cambridge.redhat.com \
    --to=dhowells@redhat.com \
    --cc=akpm@osdl.org \
    --cc=arjan@linux.intel.com \
    --cc=benh@kernel.crashing.org \
    --cc=bunk@stusta.de \
    --cc=jeff@garzik.org \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=netdev@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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

all inboxes | Powered by JetHome®