From: Geert Uytterhoeven <geert@linux-m68k.org>
To: David Woodhouse <dwmw2@infradead.org>
Cc: Sam Ravnborg <sam@ravnborg.org>,
Vegard Nossum <vegard.nossum@gmail.com>,
linux-kbuild <linux-kbuild@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Jan Engelhardt <jengelh@computergmbh.de>,
Roman Zippel <zippel@linux-m68k.org>,
Linux/m68k <linux-m68k@vger.kernel.org>
Subject: Re: [PATCH] Speed up "make headers_*"
Date: Sun, 8 Jun 2008 22:36:50 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.64.0806082235240.25145@anakin> (raw)
In-Reply-To: <1212931024.32207.546.camel@pmac.infradead.org>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 4716 bytes --]
On Sun, 8 Jun 2008, David Woodhouse wrote:
> On Sun, 2008-06-08 at 13:17 +0200, Sam Ravnborg wrote:
> > #if !defined(CONFIG_M68K) || !defined(__KERNEL__)
>
> That's just scary, and broken for m68k where in userspace neither
> CONFIG_M68K nor __KERNEL__ will be defined, so the unwanted ac_ahz
> member will actually show up and break the binary compatibility.
>
> Assuming we _don't_ want the ac_ahz member to be included on m68k, this
> should fix it (is __mc68000__ the right thing to use?)...
>
> diff --git a/include/linux/acct.h b/include/linux/acct.h
> index e8cae54..228473b 100644
> --- a/include/linux/acct.h
> +++ b/include/linux/acct.h
> @@ -58,8 +58,7 @@ struct acct
> comp_t ac_minflt; /* Minor Pagefaults */
> comp_t ac_majflt; /* Major Pagefaults */
> comp_t ac_swaps; /* Number of Swaps */
> -/* m68k had no padding here. */
> -#if !defined(CONFIG_M68K) || !defined(__KERNEL__)
> +#ifndef __mc68000__ /* m68k had no padding here. */
> __u16 ac_ahz; /* AHZ */
> #endif
> __u32 ac_exitcode; /* Exitcode */
>
JFYI, this was introduced by (from the `full-history-linux' tree):
commit 83245ea9c7212315e2f265f60e966534ba97a08a
Author: Tim Schmielau <tim@physik3.uni-rostock.de>
Date: Thu Jun 17 18:01:23 2004 -0700
[PATCH] BSD accounting format rework
BSD accounting format rework:
Use all explicit and implicit padding in struct acct to
- correctly report 32 bit uid/gid,
- correctly report jobs (e.g., daemons) running longer than 497 days,
- increase the precision of ac_etime from 2^-13 to 2^-20
(i.e., from ~6 hours to ~1 min. after a year)
- store the current AHZ value.
- allow cross-platform processing of the accounting file
(limited for m68k which has a different size struct acct).
- introduce versioning for smooth transition to incompatible formats in
the future. Currently the following version numbers are defined:
0: old format (until 2.6.7) with 16 bit uid/gid
1: extended variant (binary compatible to v0 on M68K)
2: extended variant (binary compatible to v0 on everything except M68K)
3: a new binary incompatible format (64 bytes)
4: new binary incompatible format (128 bytes).
layout of its first 64 bytes is the same as for v3.
5: marks second half of new binary incompatible format (128 bytes)
(layout is not yet defined)
All this is accomplished without breaking binary compatibility. 32 bit
uid/gid support is compatible with the patch previously floating around and
used e.g. by Red Hat.
This patch also introduces a config option for a new, binary incompatible
"version 3" format that
- is uniform across and properly aligned on all platforms
- stores pid and ppid
- uses AHZ==100 on all platforms (allows to report longer times)
Much of the compatibility glue goes away when v1/v2 support is removed from
the kernel. Such a patch is at
http://www.physik3.uni-rostock.de/tim/kernel/2.7/acct-cleanup-04.patch
and might be applied in the 2.7 timeframe.
The new v3 format is source compatible with current GNU acct tools (6.3.5).
However, current GNU acct tools can be compiled for only one format. As the
is no way to pass the kernel configuration to userspace, with my patch it wi
still only support the old v2 format. Only if v1/v2 support is removed from
the kernel, recompiling GNU acct tools will yield v3 support.
A preliminary take at the corresponding work on cross-platform userspace too
(GNU acct package) is at
http://www.physik3.uni-rostock.de/tim/kernel/utils/acct/
This version of the package is able to read any of the v0/v2/v3 formats,
regardless of byte-order (untested), even within the same file.
Cross-platform compatibility with m68k (v1 format) is not yet implemented, b
native use on m68k should work (untested). pid and ppid are currently only
shown by the dump-acct utility.
Thanks to Arthur Corliss, Albert Cahalan and Ragnar Kjørstad for their
comments, and to Albert Cahalan for the u64->IEEE float conversion code.
Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next prev parent reply other threads:[~2008-06-08 20:37 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-08 9:47 [PATCH] Speed up "make headers_*" Sam Ravnborg
2008-06-08 10:12 ` Vegard Nossum
2008-06-08 10:41 ` Sam Ravnborg
2008-06-08 10:49 ` David Woodhouse
2008-06-08 11:17 ` Sam Ravnborg
2008-06-08 12:23 ` Oleg Verych
2008-06-08 13:17 ` David Woodhouse
2008-06-08 17:06 ` Segher Boessenkool
2008-06-08 17:34 ` Andreas Schwab
2008-06-08 19:45 ` Segher Boessenkool
2008-06-08 20:36 ` Geert Uytterhoeven [this message]
2008-06-08 11:01 ` WANG Cong
2008-06-08 11:18 ` Sam Ravnborg
2008-06-08 11:06 ` Vegard Nossum
2008-06-08 11:20 ` Sam Ravnborg
2008-06-08 11:20 ` David Woodhouse
2008-06-08 11:30 ` Sam Ravnborg
2008-06-08 11:47 ` David Woodhouse
2008-06-08 12:14 ` David Woodhouse
2008-06-08 12:29 ` David Woodhouse
2008-06-08 20:07 ` Sam Ravnborg
2008-06-08 20:58 ` David Woodhouse
2008-06-08 21:13 ` Sam Ravnborg
2008-06-09 6:23 ` Sam Ravnborg
2008-06-08 20:07 ` [PATCH 1/6] kbuild: refactor headers_* targets in Makefile Sam Ravnborg
2008-06-08 20:07 ` [PATCH 2/6] kbuild: always unifdef files in headers_install* Sam Ravnborg
2008-06-08 20:07 ` [PATCH 3/6] kbuild: drop support of ALTARCH for headers_* Sam Ravnborg
2008-06-08 20:07 ` [PATCH 4/6] kbuild: code refactoring in Makefile.headerinst Sam Ravnborg
2008-06-08 20:07 ` [PATCH 5/6] kbuild: error out early in make headers_install Sam Ravnborg
2008-06-09 10:19 ` David Woodhouse
2008-06-08 20:07 ` [PATCH 6/6] kbuild: optimize headers_* targets Sam Ravnborg
2008-06-08 20:37 ` Vegard Nossum
2008-06-08 21:15 ` Sam Ravnborg
-- strict thread matches above, loose matches on Subject: below --
2008-06-26 1:59 [PATCH] Speed up "make headers_*" Tim Schmielau
2008-06-26 7:11 ` Adrian Bunk
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=Pine.LNX.4.64.0806082235240.25145@anakin \
--to=geert@linux-m68k.org \
--cc=dwmw2@infradead.org \
--cc=jengelh@computergmbh.de \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@vger.kernel.org \
--cc=sam@ravnborg.org \
--cc=torvalds@linux-foundation.org \
--cc=vegard.nossum@gmail.com \
--cc=zippel@linux-m68k.org \
/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