Kernelnewbies Digest, Vol 19, Issue 43
zhaoqiao
qiaozqjhsy at gmail.com
Thu Jun 21 21:29:02 EDT 2012
2012/6/22 <kernelnewbies-request at kernelnewbies.org>
> Send Kernelnewbies mailing list submissions to
> kernelnewbies at kernelnewbies.org
>
> To 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.org
>
> You can reach the person managing the list at
> kernelnewbies-owner at kernelnewbies.org
>
> When 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 some current.h files 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 <greg.freemyer at gmail.com>
> Subject: Re: download the source code of some commands
> To: ?? <wangzhe5004 at gmail.com>
> Cc: kernelnewbies <kernelnewbies at kernelnewbies.org>
> Message-ID:
> <CAGpXXZLM7s_=2xWcEDFtSrj_0-EjgP7aP7XNu1XEmZMEhXT53w at mail.gmail.com
> >
> Content-Type: text/plain; charset=UTF-8
>
> On Thu, Jun 21, 2012 at 8:48 AM, ?? <wangzhe5004 at gmail.com> wrote:
> > ? 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_base
>
> Once you know the package your distro uses you can download the
> corresponding source package for it.
>
> 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 !
>
>
> ------------------------------
>
> Message: 2
> Date: Thu, 21 Jun 2012 10:54:59 -0400 (EDT)
> From: "Robert P. J. Day" <rpjday at crashcourse.ca>
> Subject: could some current.h files be simplified?
> To: Kernel Newbies <kernelnewbies at kernelnewbies.org>
> Message-ID: <alpine.DEB.2.02.1206211048240.22454 at oneiric>
> Content-Type: TEXT/PLAIN; charset=US-ASCII
>
>
> it *seems* as if a number of current.h files from various
> architectures could be simplified. here's <asm-generic/current.h>,
> which gives any architecture a generic starting point in defining both
> get_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 current get_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.h file 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.h files can't just
> include the generic one?
>
> rday
>
> --
>
> ========================================================================
> Robert P. J. Day Ottawa, Ontario, CANADA
> http://crashcourse.ca
>
> Twitter: 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 <f3d27b at gmail.com>
> Subject: Re: download the source code of some commands
> To: ?? <wangzhe5004 at gmail.com>
> Cc: kernelnewbies <kernelnewbies at kernelnewbies.org>
> Message-ID: <4fe33c55.83da440a.4026.ffffc75b at mx.google.com>
> Content-Type: text/plain; charset=utf-8
>
> 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.gz
>
> Then, use dpkg -S to show which package it's included. This one is:
> sysvinit.
> [~]$ dpkg -S /sbin/halt
> sysvinit: /sbin/halt
>
> Now, you can download the source from Debian source, use:
> [~]$ apt-get source sysvinit
>
> Or 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/sysvinit
>
> At last, get it from there. As for other package systems, I think there
> should be a way too. Or you can google.
>
> On 2012-06-21 20:48:48 +0800, ?? wrote:
> > 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: ?? <wangzhe5004 at gmail.com>
> Subject: Re: download the source code of some commands
> To: Wang Lei <f3d27b at gmail.com>
> Cc: kernelnewbies <kernelnewbies at kernelnewbies.org>
> Message-ID:
> <CAJrRU3XDpS620jOe+Q8W+siuGvR3CzzJOHZg3e+pWSSU5t0Tuw at mail.gmail.com
> >
> Content-Type: text/plain; charset="gb2312"
>
> 2012/6/21 Wang Lei <f3d27b at gmail.com>
>
> > 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.gz
> >
> > Then, use dpkg -S to show which package it's included. This one is:
> > sysvinit.
> > [~]$ dpkg -S /sbin/halt
> > sysvinit: /sbin/halt
> >
> > Now, you can download the source from Debian source, use:
> > [~]$ apt-get source sysvinit
> >
> > Or 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/sysvinit
> >
> > 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.
>
> On 2012-06-21 20:48:48 +0800, ?? wrote:
> > 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
> >
> -------------- 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 <kernel.vijay at gmail.com>
> Cc: kernelnewbies at kernelnewbies.org
> Message-ID: <20120621154824.GA2280 at grml>
> Content-Type: text/plain; charset=us-ascii
>
> Hi!
>
> On 17:57 Thu 21 Jun , Vijay Chauhan wrote:
> > 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.
>
> > 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
>
>
>
> ------------------------------
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
> End 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
More information about the Kernelnewbies
mailing list