How Kernel command line parameters passed to kernel.
Hi All, I have a doubt, how kernel command line parameters are passed to kernel space. Before device tree, we used to pass command line parameters using ATAGS. But after device tree we are not using ATAGS. How we are passing command line parameters to kernel space? Thanks & regards, Madhu ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Is vnode number also limit system-wide number of open file?
On Thu, 01 Jun 2017 17:15:29 +0800, Yubin Ruan said: > Regarding to inode number, I notice that nearly every filesystem has tree > representation of the inode number: > 1. on-disk inode number > 2. in-memory inode number > 3. VFS inode number > How are these related? I mean, if they are all the same, then if filesystem A > and filesystem B both have some identical inode number, the VFS inode numbers > will conflict. What's tracked is the pair (filesystem, inode). So inode 3945 on /usr is different from inode 3945 on /home. (Strictly speaking, it tracks the major,minor number for the device that has the filesystem on it - so if /usr is on /dev/sda3, and /dev/sda3 looks like: ls -l /dev/sda3 brw-rw. 1 root disk 8, 3 May 31 19:47 /dev/sda3 What's really tracked is ((8,3),3945). Although many places in the kernel will equate "a pointer to the in-memory copy of the superblock for the filesystem on 8,3" with the actual major/minor - mostly because if you're looking at the device node numbers for the filesystem, you're probably going to be needing that superblock *anyhow*. Similar games are played for the on-disk and in-memmory inode numbers - as long as the system keeps track of what the mapping is, there's no need for them to actually be identical... pgp9Q7Mw7XaPS.pgp Description: PGP signature ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Is vnode number also limit system-wide number of open file?
On Wed, May 31, 2017 at 01:30:59PM -0400, Rik van Riel wrote: > On Wed, 2017-05-31 at 21:37 +0800, Yubin Ruan wrote: > > I notice that there is a > > > > unsigned long i_ino; > > > > in definition of `struct inode' [1], which is the virtual filesystem > > inode. > > Does that mean "inode number" and is it used for indexing in the > > system-wide > > inode table? > > > > If that is the case, would that limit the number of open file in > > Linux? > > Those numbers are unrelated. > > The i_ino number is the inode number within each > filesystem, and different filesystems can have > inodes with the same inode numbers. Regarding to inode number, I notice that nearly every filesystem has tree representation of the inode number: 1. on-disk inode number 2. in-memory inode number 3. VFS inode number How are these related? I mean, if they are all the same, then if filesystem A and filesystem B both have some identical inode number, the VFS inode numbers will conflict. Yubin > File descriptors (open files) point to a struct inode > somewhere in memory. The same file can be opened many > times (all programs opening libc.so). Many files will > not be opened by any program at all. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Is vnode number also limit system-wide number of open file?
On Wed, 2017-05-31 at 21:37 +0800, Yubin Ruan wrote: > I notice that there is a > > unsigned long i_ino; > > in definition of `struct inode' [1], which is the virtual filesystem > inode. > Does that mean "inode number" and is it used for indexing in the > system-wide > inode table? > > If that is the case, would that limit the number of open file in > Linux? Those numbers are unrelated. The i_ino number is the inode number within each filesystem, and different filesystems can have inodes with the same inode numbers. File descriptors (open files) point to a struct inode somewhere in memory. The same file can be opened many times (all programs opening libc.so). Many files will not be opened by any program at all. -- All Rights Reversed. signature.asc Description: This is a digitally signed message part ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: cross compiling
Hi On Wed, May 31, 2017 at 12:21 AM, juan pedro meriñowrote: > Toolchin for compiler linux? > Take a look at this page of kernelnewbies https://kernelnewbies.org/FAQ/KernelCrossCompilation BR Loïc > ___ > Kernelnewbies mailing list > Kernelnewbies@kernelnewbies.org > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Is vnode number also limit system-wide number of open file?
On Wed, May 31, 2017 at 08:34:09AM +0100, Okash Khawaja wrote: > > > > On 31 May 2017, at 14:37, Yubin Ruanwrote: > > > > I notice that there is a > > > >unsigned longi_ino; > > > > in definition of `struct inode' [1], which is the virtual filesystem inode. > > Does that mean "inode number" and is it used for indexing in the system-wide > > inode table? > > > > If that is the case, would that limit the number of open file in Linux? > > > > I know there *is* such a limit, and superusers can adjust that by > > /proc/sys/fs/file-max. Currently I cannot raise that to too high, otherwise > > the system would crash, which I think is because I have limited memory. But, > > the point is, if I have lots of memory in my machine (say hunderds of > > Gigabytes), would the number of open file system-wide limited by the `i_ino' > > above? Since its type is "unsigned long", I guess I can only open > > 2^(sizeof(unsigned long)) file simultaneously? > > 2^(8*sizeof(unsigned long)) good catch. > Which is big. Is there some use case for very large number of files? No, I just wonder whether this is the limit... -- Yubin ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Is vnode number also limit system-wide number of open file?
> On 31 May 2017, at 14:37, Yubin Ruanwrote: > > I notice that there is a > >unsigned longi_ino; > > in definition of `struct inode' [1], which is the virtual filesystem inode. > Does that mean "inode number" and is it used for indexing in the system-wide > inode table? > > If that is the case, would that limit the number of open file in Linux? > > I know there *is* such a limit, and superusers can adjust that by > /proc/sys/fs/file-max. Currently I cannot raise that to too high, otherwise > the system would crash, which I think is because I have limited memory. But, > the point is, if I have lots of memory in my machine (say hunderds of > Gigabytes), would the number of open file system-wide limited by the `i_ino' > above? Since its type is "unsigned long", I guess I can only open > 2^(sizeof(unsigned long)) file simultaneously? 2^(8*sizeof(unsigned long)) Which is big. Is there some use case for very large number of files? ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Update a newly-created '.config' file with some predefined values
On Tue, May 30, 2017 at 12:28:34PM +0300, Roman Storozhenko wrote: > Hello everybody, > > I have a host machine and I have a VM machine running CentOS 7 with 3.x. > There is > a kernel source tree on the host. I have made 'make menuconfig', > populated all options that I want to have in my custom kernel and as a > result got a '.config' file. Then I copied a centos-default distro config > file from my VM's > 'boot' catalog to my host's kernel source tree catalog. So now I have > two files in my source tree: '.config' and '.config.old'. I am able to > see difference between them using the following command: > > scripts/diffconfig .config.old .config | less > > But is there anyway to update values in '.config' file with the > apropriate values from '.config.old' file? > I just want to make sure that all modules will be included in a > new custom kernel. > > Thanks in advance, > Roman I have found a solution. There is a script: scripts/kconfig/merge_config.sh It allows to mix many configuration files in a base config. For example: scripts/kconfig/merge_config.sh -m -r .config ~/kernel/conf_mixins/.config_deb There are kernel options in .config_deb that include some debugging to the kernel default .config. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies