Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

freebsd-hackers Digest, Vol 366, Issue 4

0 views
Skip to first unread message

freebsd-hac...@freebsd.org

unread,
Apr 1, 2010, 8:00:25 AM4/1/10
to freebsd...@freebsd.org
Send freebsd-hackers mailing list submissions to
freebsd...@freebsd.org

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
or, via email, send a message with subject or body 'help' to
freebsd-hac...@freebsd.org

You can reach the person managing the list at
freebsd-ha...@freebsd.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of freebsd-hackers digest..."


Today's Topics:

1. Re: Dynamic ticks in FreeBSD (Tsuyoshi Ozawa)
2. Re: building world with debugging symbols (Giorgos Keramidas)
3. Re: kern/104406 on 8.0-RELEASE-p2 ? (Victor Sudakov)
4. Re: Dynamic ticks in FreeBSD (Andriy Gapon)
5. Re: Dynamic ticks in FreeBSD (Roman Divacky)
6. Re: Dynamic ticks in FreeBSD (Artem Belevich)
7. Re: Dynamic ticks in FreeBSD (John Baldwin)
8. Fwd: mkuzip and/or geom_uzip changes? (Tim Judd)
9. AHCI Driver on ICH7 (27c08086) Chipset (Ali Mashtizadeh)
10. Re: AHCI Driver on ICH7 (27c08086) Chipset (Alexander Motin)
11. Newbie question: kernel image a dynamically linked binary?
(Daniel Rodrick)
12. Re: AHCI Driver on ICH7 (27c08086) Chipset (Eugene Grosbein)
13. Re: Newbie question: kernel image a dynamically linked
binary? (Gary Jennejohn)


----------------------------------------------------------------------

Message: 1
Date: Wed, 31 Mar 2010 04:05:33 -0800
From: Tsuyoshi Ozawa <ozaw...@t-oza.net>
Subject: Re: Dynamic ticks in FreeBSD
To: Roman Divacky <rdiv...@freebsd.org>, Julian Elischer
<jul...@elischer.org>, Dag-Erling Sm?rgrav <d...@des.no>
Cc: freebsd-hackers <freebsd...@freebsd.org>
Message-ID:
<p2p411a180c1003310505qb...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Thank you for replying !

The patch for FreeBSD 8.0 original source is here :
http://gist.github.com/350230
If this patch cause collision, I'm going to throw patch between
FreeBSD 8.0 HEAD and my chage. (sorry for this, I cannot connect to
CVS repository now for network reason. It take a few days to connect
CVS repository.)

2010/3/30 Julian Elischer <jul...@elischer.org>:
> Who are you? and what have you done with DES?

Sorry for suddenly patch, but I suggested this work at AsiaBSDcon 2010.
And some person insisted needs, so I wrote prototype.
I met Julian, DES, roman for the first time here. Nice to meet you.

As you can see this patch, the implementation is very rough.
I realy needs your help to accomplish this work. Thank you !

Very Truly yours
Tsuyoshi Ozawa
<oz...@t-oza.net>


------------------------------

Message: 2
Date: Wed, 31 Mar 2010 15:52:53 +0300
From: Giorgos Keramidas <kera...@ceid.upatras.gr>
Subject: Re: building world with debugging symbols
To: John Baldwin <j...@freebsd.org>
Cc: Bruce Cran <br...@cran.org.uk>, freebsd...@freebsd.org,
Alexander Best <alexb...@wwu.de>
Message-ID: <87bpe4p...@kobe.laptop>
Content-Type: text/plain; charset=us-ascii

On Tue, 30 Mar 2010 15:10:58 -0400, John Baldwin <j...@freebsd.org> wrote:
> On Tuesday 30 March 2010 11:48:58 am Giorgos Keramidas wrote:
>> +.It Va DEBUG_FLAGS
>> +Defines a set of debugging flags that will be used to build all userland
>> +binaries under
>> +.Pa /usr/src .
>> +When
>> +.Va DEBUG_FLAGS
>> +is defined, the
>> +.Cm install
>> +and
>> +.Cm installworld
>> +targets install binaries from the current
>> +.Va MAKEOBJDIRPREFIX
>> +without stripping too, so that debugging information is retained in the
>> +installed binaries.
>
> I would drop the "too" and start 'so' on a new line (at least that is
> my interpretation of the line-break rules we use for mdoc). Other
> than that I think this looks fine.

Fixed and committed in r205978. Thanks :)

------------------------------

Message: 3
Date: Wed, 31 Mar 2010 20:54:29 +0700
From: Victor Sudakov <sudakov...@sibptus.tomsk.ru>
Subject: Re: kern/104406 on 8.0-RELEASE-p2 ?
To: freebsd-hackers <freebsd...@freebsd.org>
Message-ID: <20100331135...@admin.sibptus.tomsk.ru>
Content-Type: text/plain; charset=us-ascii

Rink Springer wrote:
> > However, my box does not crash or lock up hard, just some processes
> > lock up in the "ufs" state and other processes cannot access files.
>
> Have you tried fsck(8)-ing all filesystems to ensure they are OK ?

Actually, fsck is run every time I reset the box, and I reset it every
time it locks up, because when it is locked up, a graceful reboot is
impossible. You can say "reboot" but it will wait forever, probably
unable to kill the locked up processes.

--
Victor Sudakov, VAS4-RIPE, VAS47-RIPN
sip:sud...@sibptus.tomsk.ru


------------------------------

Message: 4
Date: Wed, 31 Mar 2010 17:14:08 +0300
From: Andriy Gapon <a...@icyb.net.ua>
Subject: Re: Dynamic ticks in FreeBSD
To: Tsuyoshi Ozawa <ozaw...@t-oza.net>
Cc: Dag-Erling Sm?rgrav <d...@des.no>, Roman Divacky
<rdiv...@freebsd.org>, Julian Elischer <jul...@elischer.org>,
freebsd-hackers <freebsd...@freebsd.org>
Message-ID: <4BB358B0...@icyb.net.ua>
Content-Type: text/plain; charset=ISO-8859-1

on 31/03/2010 15:05 Tsuyoshi Ozawa said the following:
> Thank you for replying !
>
> The patch for FreeBSD 8.0 original source is here :
> http://gist.github.com/350230
> If this patch cause collision, I'm going to throw patch between
> FreeBSD 8.0 HEAD and my chage. (sorry for this, I cannot connect to
> CVS repository now for network reason. It take a few days to connect
> CVS repository.)

Thank you for this interesting and useful work!
I looked through the code and here is my understanding of how it works, it
coincides with how you described it, but I'd like to state it in my own words :-)

1. Instead of firing clock (LAPIC timer) interrupt regularly with a frequency
derived from HZ, the interrupt is scheduled to fire (in one-shot mode) at the time
of the soonest scheduled callout.
2. The code also makes sure to run hard/stat/prof-clocks if time since last
interrupt is greater than their respective periods in !dyntick mode.

Thus, it appears that in dyntick mode hard/stat/prof-clocks would run irregularly.
I couldn't find any code that makes sure that the rest of the system handles this
properly. Perhaps I missed it, or is it still in progress/plans?

Also, I am not sure if the code handles the case when a new 'soonest' callout is
scheduled after we already decided when to fire the next LAPIC timer interrupt.

Thank you very much again!
Please keep up the good work :)

--
Andriy Gapon


------------------------------

Message: 5
Date: Wed, 31 Mar 2010 16:22:58 +0200
From: Roman Divacky <rdiv...@freebsd.org>
Subject: Re: Dynamic ticks in FreeBSD
To: Tsuyoshi Ozawa <ozaw...@t-oza.net>
Cc: Dag-Erling Sm?rgrav <d...@des.no>, Julian Elischer
<jul...@elischer.org>, freebsd-hackers <freebsd...@freebsd.org>
Message-ID: <20100331142...@freebsd.org>
Content-Type: text/plain; charset=us-ascii

On Wed, Mar 31, 2010 at 04:05:33AM -0800, Tsuyoshi Ozawa wrote:
> Thank you for replying !
>
> The patch for FreeBSD 8.0 original source is here :
> http://gist.github.com/350230

looks good

I wonder - why don't we store the callouts in binary
tree so the searching for nearest callout is faster?

what is the average length of the callout queue?


------------------------------

Message: 6
Date: Wed, 31 Mar 2010 07:36:43 -0700
From: Artem Belevich <fbsd...@src.cx>
Subject: Re: Dynamic ticks in FreeBSD
To: Roman Divacky <rdiv...@freebsd.org>
Cc: Tsuyoshi Ozawa <ozaw...@t-oza.net>, Julian Elischer
<jul...@elischer.org>, freebsd-hackers <freebsd...@freebsd.org>,
Dag-Erling Sm?rgrav <d...@des.no>
Message-ID:
<o2wed91d4a81003310736rc...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

It may be worth it to look at Solaris' cyclic facillity for ideas.
sys/cddl/dev/cyclic/cyclic.c

--Artem

On Wed, Mar 31, 2010 at 7:22 AM, Roman Divacky <rdiv...@freebsd.org> wrote:
> On Wed, Mar 31, 2010 at 04:05:33AM -0800, Tsuyoshi Ozawa wrote:
>> Thank you for replying !
>>
>> The patch for FreeBSD 8.0 original source is here :
>> http://gist.github.com/350230
>
> looks good
>
> I wonder - why don't we store the callouts in binary
> tree so the searching for nearest callout is faster?
>
> what is the average length of the callout queue?
> _______________________________________________
> freebsd...@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hacke...@freebsd.org"
>


------------------------------

Message: 7
Date: Wed, 31 Mar 2010 12:54:19 -0400
From: John Baldwin <j...@freebsd.org>
Subject: Re: Dynamic ticks in FreeBSD
To: freebsd...@freebsd.org
Cc: Tsuyoshi Ozawa <ozaw...@t-oza.net>
Message-ID: <20100331125...@freebsd.org>
Content-Type: Text/Plain; charset="iso-8859-1"

On Tuesday 30 March 2010 9:39:04 am Tsuyoshi Ozawa wrote:
> Hello,
>
> I started to work dynamic ticks in FreeBSD, and now experimental
> code start to work roughly.
> The code is here : http://github.com/oza/FreeBSD-8.0-dyntick
>
> The timer interrupt handler works as follows :
> 1. Scan callout queue and get when the timer fire. This is the value
> we can skip.
> 2. Run hardware timer in "oneshot mode" instead of periodic mode.
> My experimental code only work for local apic timer.
> After translating the value which is gotten at 1 to local apic timer
> count, pass the value to local apic timer.
> 3. Exit timer interrupt handler.
>
> My experimental code needs a kernel module to switch to dynamic
> tick mode. The kernel module is here : http://gist.github.com/345917
>
> The benchmark is here :
> http://tsuyoshiozawa.blogspot.com/2010/03/started-to-implement-dynticks-
in.html
>
> The result says that dynticks can save CPU power significantly,
> so this worth to work. But this is incomplete to work kernel components
> correctly. There are a lot of problems:
>
> 1. The global variable "ticks" isn't incremented by 2 and above.
> This gets worse the response.
> 2. To fix problem 1, I have to hack scheduler and profiler.
> If I do 1, these kernel component doesn't work correctly.
>
> But 2. is very expensive to implement. I think that it's good to
> switch between periodic ticks mode and dynamic ticks mode
> when isched_idletd is scheduled. So I'm planning to do this as
> a next step.
>
> If you have some idea or question about this work,
> please let me know. Thank you!

Are you doing anything to handle the case where the lapic timer is turned off
when a CPU enters C2 or C3? The ideal approach in my mind would be to not use
the lapic timer at all when running in a deadline mode, but give each CPU a
dedicated HPET comparator. Alternatively, you could add some special handling
where CPU 0 never goes into C2 or C3 but sends IPIs to other CPUs in deep idle
states when necessary (you could also let CPU 0 fake statclock() for said CPUs
as well perhaps).

--
John Baldwin


------------------------------

Message: 8
Date: Wed, 31 Mar 2010 16:32:09 -0600
From: Tim Judd <taj...@gmail.com>
Subject: Fwd: mkuzip and/or geom_uzip changes?
To: freebsd-hackers <freebsd...@freebsd.org>
Message-ID:
<t2qade45ae91003311532h4...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Also in a separate thread to -questions. Thought it was better on
hackers after a few hours thought.


---------- Forwarded message ----------
From: Tim Judd <taj...@gmail.com>
Date: Wed, 31 Mar 2010 04:59:52 -0600
Subject: mkuzip and/or geom_uzip changes?
To: FreeBSD Questions <freebsd-...@freebsd.org>

Hi All,

Just starting to see if I can find other reports. You all probably
have had the "more than one pair of eyes looking at a thing is better
than my eyes alone." This is why I'm writing now, as I'm starting the
discovery.

Let me background this a little bit. I only started looking into this
because mkuzip and it's counterpart, geom_uzip are throwing errors on
FreeBSD8 i386


scenario (/etc/src.conf in effect, removing *LOTS* of stuff with knobs):
make DESTDIR=/home/small8 installworld installkernel distribution
mv /home/small8/boot /home/small8-boot/
makefs -t ffs /home/small8/usr.img /home/small8/usr/
mkuzip -o /home/small8/usr.uzip /home/small8/usr.img [*]
chflags -R noschg /home/small8/usr/*
rm -rf /home/small8/usr/* /home/small8/usr.img
ee /home/small8/etc/rc.d/mountcritlocal
[**]
makefs -t ffs /home/small8-boot/mfsroot /home/small8/
gzip --best /home/small8-boot/mfsroot
ee /home/small8-boot/boot/loader.conf
[***]
rm /home/small8-boot/boot/kernel/*.symbols
gzip --best /home/small8-boot/boot/kernel/kernel
mkisofs -U -J -r -V "FreeBSD8" -b boot/cdboot -no-emul-boot
-iso-level 4 -o /home/small8.iso /home/small8-boot/


[*]: mkuzip inserts a script header that is broken. module name it's
searching for may have been renamed?
[**]: Edited mountcritlocal to mount the usr.uzip file as by using the
above script header, throws errors
[***]: added zlib and geom_uzip modules to load to the boot image, to
satisfy the script header's requirements.

OK, the above scenario creates about a 33MB usr.uzip, and a 68MB iso.
Small enough to apparently fit into the undocumented 50 or 100MB size
limit of mfs_root module


The problem:
mkuzip generates a few lines as a script in the head of the
resulting *.uzip file. Two problems...
1) the module it queries for is geom_uzip (kldstat -m $m), but
FreeBSD8 names the geom_uzip module (i guess, internally) as g_uzip.
mkuzip's generated image will never find the module if they're not
named the same.
2) even with geom_uzip module and it's dependency zlib loaded, i don't
get a mdconfig node '/dev/md?.uzip' to appear.

It's been forever since I touched uzip, so I have to ask.


Looking at the cvsweb, (as a bonus question, what's the svn website
address to look at source files?) mkuzip program last modified 3 years
(2 months for the Makefile), geom_uzip module Makefile last modified 4
years ago.

3-4 years yield a median FreeBSD version 6.2. Have we broken
something in 7 or 8?

The request:
Is it a PEBKAC? ID 10T error? Duplicatable?


I'm gonna research what I can, when I can. I would expect to see
something pop up clearly if it is a regression. Can I ask you all to
use your eyes or past knowledge if something is broken?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: src.conf
Type: application/octet-stream
Size: 1028 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20100331/ba488c60/src-0001.obj

------------------------------

Message: 9
Date: Wed, 31 Mar 2010 22:43:44 -0700
From: Ali Mashtizadeh <masht...@gmail.com>
Subject: AHCI Driver on ICH7 (27c08086) Chipset
To: freebsd...@freebsd.org
Message-ID:
<z2l440b3e931003312243i9...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

Hi Everyone,

I have a new motherboard with an ICH7 chipset (G41) and the ata driver
recognizes it as ATA_I82801GB_S1 (PCI ID 27c08086), but this card does
not seem to work with the AHCI. Can anyone point me to why this is the
case? I really need NCQ working for this machine.

Thanks,
--
Ali Mashtizadeh
علی مشتی زاده


------------------------------

Message: 10
Date: Thu, 01 Apr 2010 13:51:42 +0300
From: Alexander Motin <m...@FreeBSD.org>
Subject: Re: AHCI Driver on ICH7 (27c08086) Chipset
To: Ali Mashtizadeh <masht...@gmail.com>
Cc: freebsd...@freebsd.org
Message-ID: <4BB47ABE...@FreeBSD.org>
Content-Type: text/plain; charset=UTF-8

Ali Mashtizadeh wrote:
> I have a new motherboard with an ICH7 chipset (G41) and the ata driver
> recognizes it as ATA_I82801GB_S1 (PCI ID 27c08086), but this card does
> not seem to work with the AHCI. Can anyone point me to why this is the
> case? I really need NCQ working for this machine.

Most of ICH7 chipsets (especially on cheap boards) do not support AHCI
mode. Only ICH7R and ICH7M do, if BIOS is so kind to enable it.

--
Alexander Motin


------------------------------

Message: 11
Date: Thu, 1 Apr 2010 15:53:50 +0530
From: Daniel Rodrick <daniel....@gmail.com>
Subject: Newbie question: kernel image a dynamically linked binary?
To: freebsd...@freebsd.org, freebsd...@freebsd.org,
freebs...@freebsd.org
Message-ID:
<l2r292693081004010323j4...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Hello List,

I'm a newbie and coming from Linux background, and am trying to learn
FreeBSD now. The first thing I find a little confusing is that the
final FreeBSD kernel image is shown as a DYNAMICALLY LINKED binary:

$
$ pwd
/boot/kernel
$
$ file kernel
kernel: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD),
dynamically linked (uses shared libs), not stripped
$

How can the kernel image use shared libraries? And which ones does it
use, if any?

Also, I cannot find out the libraries the image uses using the
traditional ldd command:

$ ldd kernel
kernel:
kernel: signal 6
$

Can some please throw some light?

Thanks,

Dan


------------------------------

Message: 12
Date: Thu, 01 Apr 2010 16:12:34 +0700
From: Eugene Grosbein <eu...@kuzbass.ru>
Subject: Re: AHCI Driver on ICH7 (27c08086) Chipset
To: Ali Mashtizadeh <masht...@gmail.com>
Cc: freebsd...@freebsd.org
Message-ID: <4BB46382...@kuzbass.ru>
Content-Type: text/plain; charset=us-ascii

Ali Mashtizadeh wrote:
> Hi Everyone,
>
> I have a new motherboard with an ICH7 chipset (G41) and the ata driver
> recognizes it as ATA_I82801GB_S1 (PCI ID 27c08086), but this card does
> not seem to work with the AHCI. Can anyone point me to why this is the
> case? I really need NCQ working for this machine.

http://www.intel.com/support/chipsets/imst/sb/cs-012304.htm
In short: ICH7R and ICH7M both have AHCI support but ICH7 does not.

Eugene Grosbein


------------------------------

Message: 13
Date: Thu, 1 Apr 2010 13:36:33 +0200
From: Gary Jennejohn <gary.je...@freenet.de>
Subject: Re: Newbie question: kernel image a dynamically linked
binary?
To: Daniel Rodrick <daniel....@gmail.com>
Cc: freebsd...@freebsd.org, freebsd...@freebsd.org,
freebs...@freebsd.org
Message-ID: <20100401133...@ernst.jennejohn.org>
Content-Type: text/plain; charset=US-ASCII

On Thu, 1 Apr 2010 15:53:50 +0530
Daniel Rodrick <daniel....@gmail.com> wrote:

> Hello List,
>
> I'm a newbie and coming from Linux background, and am trying to learn
> FreeBSD now. The first thing I find a little confusing is that the
> final FreeBSD kernel image is shown as a DYNAMICALLY LINKED binary:
>
> $
> $ pwd
> /boot/kernel
> $
> $ file kernel
> kernel: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD),
> dynamically linked (uses shared libs), not stripped
> $
>
> How can the kernel image use shared libraries? And which ones does it
> use, if any?
>
> Also, I cannot find out the libraries the image uses using the
> traditional ldd command:
>
> $ ldd kernel
> kernel:
> kernel: signal 6
> $
>
> Can some please throw some light?
>

file is confused. FreeBSD uses a monolithic kernel and no shared
libraries are involved. However, it is possible to dynamically load
modules using kldload. See the appropriate man page.

--
Gary Jennejohn


------------------------------


End of freebsd-hackers Digest, Vol 366, Issue 4
***********************************************

0 new messages