Kernelnewbies Digest, Vol 19, Issue 43
2012/6/22 <[email protected]>
Quoted 59 lines
Send Kernelnewbies mailing list submissions to
kernelnewbies at kernelnewbies.orgTo subscribe or unsubscribe via the World Wide Web, visit
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
or, via email, send a message with subject or body 'help' to
kernelnewbies-request at kernelnewbies.orgYou can reach the person managing the list at
kernelnewbies-owner at kernelnewbies.orgWhen replying, please edit your Subject line so it is more specific than "Re: Contents of Kernelnewbies digest..."
Today's Topics:
1. Re: download the source code of some commands (Greg Freemyer)
2. could somecurrent.hfiles be simplified? (Robert P. J. Day)
3. Re: download the source code of some commands (Wang Lei)
4. Re: download the source code of some commands (??)
5. Re: Kernel Memory (michi1 at michaelblizek.twilightparadox.com)----------------------------------------------------------------------
Message: 1
Date: Thu, 21 Jun 2012 10:42:12 -0400
From: Greg Freemyer <[email protected]>
Subject: Re: download the source code of some commands
To: ?? <[email protected]>
Cc: kernelnewbies <[email protected]> Message-ID:
<CAGpXXZLM7s_=2xWcEDFtSrj_0-EjgP7aP7XNu1XEmZMEhXT53w@mail.gmail.comQuoted 1 line
Content-Type: text/plain; charset=UTF-8
Quoted 7 lines · ??
? Hi all:
? ? ?? I want to see some source code of some commands,for example,halt,reboot,uptime,and so on.but i don't kown where to download??? can you give me some advice?
Thanks in advance!
You need to figure out how your distro of choice lets you query the filelist for packages.
I use openSUSE primarily and it has the Yast tool that lets you do that in the software management section.
uptime => coreutils
reboot =>aaa_base
halt =>aaa_baseOnce you know the package your distro uses you can download the corresponding source package for it.
Quoted 6 lines
You will have better luck learning the process you need to know by asking on a distro specific mailing list.
Greg
hi,
you can use the download tool to get the sources code.
eg: apt-get source ssh (ubuntu)
you can get ssh source code.
but, not all !
Quoted 255 lines
------------------------------
Message: 2
Date: Thu, 21 Jun 2012 10:54:59 -0400 (EDT)
From: "Robert P. J. Day" <[email protected]>
Subject: could somecurrent.hfiles be simplified?
To: Kernel Newbies <[email protected]>
Message-ID: <alpine.DEB.2.02.1206211048240.22454@oneiric>
Content-Type: TEXT/PLAIN; charset=US-ASCIIit *seems* as if a number of
current.hfiles from various
architectures could be simplified. here's <asm-generic/current.h>, which gives any architecture a generic starting point in defining bothget_current()and current:#ifndef
__ASM_GENERIC_CURRENT_H
#define__ASM_GENERIC_CURRENT_H#include <
linux/thread_info.h>#define
get_current()(current_thread_info()->task) #define currentget_current()#endif /*
__ASM_GENERIC_CURRENT_H*/and if that's acceptable, any architecture is welcome to simply
include it as, for instance, mips does in <asm/current.h>:#include <
asm-generic/current.h>but here's the
current.hfile for parisc:#ifndef
_PARISC_CURRENT_H
#define_PARISC_CURRENT_H#include <
linux/thread_info.h>struct
task_struct;static inline struct
task_struct*get_current(void){ return current_thread_info()->task; }#define current
get_current()#endif /* !(_PARISC_CURRENT_H) */
i'm not sure i see why the generic version wasn't adequate for
parisc (apart from the explicit pointer casting). same thing with the cris architecture and, i'm sure, others.is there any reason why some of those
current.hfiles can't just
include the generic one?rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.caTwitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday========================================================================
------------------------------
Message: 3
Date: Thu, 21 Jun 2012 23:22:49 +0800
From: Wang Lei <[email protected]>
Subject: Re: download the source code of some commands
To: ?? <[email protected]>
Cc: kernelnewbies <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8If you use Debian or other distribution with apt package system.
You can use whereis to locate this command.
[~]$ whereis halt
halt:/sbin/halt/usr/share/man/man5/halt.5.gz/usr/share/man/man8/halt.8.gzThen, use dpkg -S to show which package it's included. This one is:
sysvinit.
[~]$ dpkg -S/sbin/halt
sysvinit:/sbin/haltNow, you can download the source from Debian source, use:
[~]$ apt-get source sysvinitOr if you want the original source, use aptitude (or apt-cache) find it's homepage.
[~]$ aptitude show sysvinit
Package: sysvinit
......
Homepage: http://savannah.nongnu.org/projects/sysvinitAt last, get it from there. As for other package systems, I think there should be a way too. Or you can google.
Quoted 11 lines · ??
Hi all:
I want to see some source code of some commands,for
example,halt,reboot,uptime,and so on.but i don't kown where to download? can you give me some advice?
Thanks in advance!
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies--
Regards,
Lei------------------------------
Message: 4
Date: Thu, 21 Jun 2012 23:46:21 +0800
From: ?? <[email protected]>
Subject: Re: download the source code of some commands
To: Wang Lei <[email protected]>
Cc: kernelnewbies <[email protected]> Message-ID:
<CAJrRU3XDpS620jOe+Q8W+siuGvR3CzzJOHZg3e+pWSSU5t0Tuw@mail.gmail.comQuoted 1 line
Content-Type: text/plain; charset="gb2312"
2012/6/21 Wang Lei <[email protected]>
Quoted 22 lines
If you use Debian or other distribution with apt package system.
You can use whereis to locate this command.
[~]$ whereis halt
halt:/sbin/halt/usr/share/man/man5/halt.5.gz/usr/share/man/man8/halt.8.gzThen, use dpkg -S to show which package it's included. This one is:
sysvinit.
[~]$ dpkg -S/sbin/halt
sysvinit:/sbin/haltNow, you can download the source from Debian source, use:
[~]$ apt-get source sysvinitOr if you want the original source, use aptitude (or apt-cache) find it's homepage.
[~]$ aptitude show sysvinit
Package: sysvinit
......
Homepage: http://savannah.nongnu.org/projects/sysvinitQuoted 3 lines
At last, get it from there. As for other package systems, I think there should be a way too. Or you can google.
Thank you very much ! i follow your steps, and download the source code
successfully.Quoted 8 lines · ??
Hi all:
I want to see some source code of some commands,for
example,halt,reboot,uptime,and so on.but i don't kown where to download? can you give me some advice?
Thanks in advance!
Quoted 9 lines
Quoted 4 lines
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies--
Regards,
Lei-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120621/6e586022/attachment-0001.html------------------------------
Message: 5
Date: Thu, 21 Jun 2012 17:48:25 +0200
From: michi1 at michaelblizek.twilightparadox.com
Subject: Re: Kernel Memory
To: Vijay Chauhan <[email protected]>
Cc: kernelnewbies at kernelnewbies.org
Message-ID: <20120621154824.GA2280@grml>
Content-Type: text/plain; charset=us-asciiHi!
Quoted 7 lines · Vijay Chauhan
Hello,
I am newbie.
It has been said "kernel memory is not pageable"
What does it mean? There is no concept of kernel virtual address?Any simple explanation will help me to udnerstand.
The right term is actually "kernel memory is not swappable". Swapping means writing inactive memory to disk and then using it for something else. Kernel
memory not being swappable is a design decicion made in the early linux days.
Operating systems which swap kernel memory need to isolate everything which should not be swappd out (e.g. things needed for swap-in, realtime stuff, security sensitive data, ...). This is quite a bit of work. I also guess it is
pretty pointless nowadays. Installed memory and is getting so huge that virtual
memory developers have a hard time trying to keep cpu-usage overhead for swapping user space memory low.Quoted 1 line
There is no concept of kernel virtual address?
Kernel memory uses virtual addresses as well. However, these the entire system
memory is continuously mapped somewhere in the virtual address space. The drawback is that fragmentation turns allocation of large continuous memory regions into a game of luck.There is also an virtual address area (vmalloc) which is used to dynamically
map multiple scattered pages to a continuous region. But this is rather slow
and rarely used.You might want to take a look at: http://lwn.net/Kernel/LDD3/
-Michi
--
programing a layer 3+4 network protocol for mesh networks see http://michaelblizek.twilightparadox.com------------------------------
Quoted 9 lines
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbiesEnd of Kernelnewbies Digest, Vol 19, Issue 43
*********************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120622/de0985e7/attachment-0001.html