Re: Need help to understand Linux kernel source versioning systems

2017-07-25 Thread valdis . kletnieks
On Tue, 25 Jul 2017 20:14:45 +0800, Yubin Ruan said:

> For example, let's say we are at 4.2 (or, 4.2.0) now. Before we move
> to 4.3, there would
> 4.3.1-rc, 4.3.2-rc, ..., 4.3.7-rc. After 4.3.7-rc, we have 4.3 (or,

4.3-rc1, 4.3-rc2, ... 4.3-rc7.


pgpV4kQj9amsW.pgp
Description: PGP signature
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Need help to understand Linux kernel source versioning systems

2017-07-25 Thread Yubin Ruan
2017-07-24 20:56 GMT+08:00 vibnwis :
> Hi there,
>
> Being a newbie, I encountered the following scenarios when tracing
> build_kernel.sh script from eewiki. Would someone help me to understand why
> please? From my experience, I would to summarize the following scenario.
>
> 1. First, source is cloned from
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git and
> checked for release version, "v4.10.17". Obviously it has no kernel tag of
> "v4.10.17", but "v4.10"
>
> 2. As "v4.10.17" does not exist, it tried to pull from the origin/master by
> command, git pull --no-edit
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> --tags
>
> 3. Kernel tag, of "v4.10.17" is checked being verified again, but failed.
> Hence, now it fetched from  git fetch
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
> master --tags
>
> Now, the kernel, of v4.10.17" is found.
>
> My questions are:
>
> 1. One would know that clone of
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git would not
> produce kernel tag of , "v4.10.17", wouldn't it?
>
> 2. Similar by pull it again from
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git with
> option of master --tags would not produce kernel tag, "v4.10.17" as well,
> wouldn' it?
>
> 3. Since fetching with git fetch
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
> master --tags would produce v4.10.17, why would not it clone it from
> .../stable/linux-stable,git?

Here is the basic Linux kernel development model: Before every "major" release,
there would be 7 "rc" release, and along with each rc release, there
is a stable release.
For example, let's say we are at 4.2 (or, 4.2.0) now. Before we move
to 4.3, there would
4.3.1-rc, 4.3.2-rc, ..., 4.3.7-rc. After 4.3.7-rc, we have 4.3 (or,
4.3.0). But, rc release is not
stable! So, in order to enable users to use/test the kernel, Greg KH
would maintain a
relatively stable kernel along with each rc release. In the example
above, there would be
4.2.1 along with 4.3.1-rc, 4.2.2 along with 4.3.2-rc, etc. Basically
it is something like this:

 4.2.0
  |  \
4.3.1-rc4.2.1
  ||
4.3.2-rc 4.2.2
  ||
4.3.3-rc 4.2.3
  ||
4.3.4-rc 4.2.4
  ||
4.3.5-rc 4.2.5
  ||
4.3.6-rc 4.2.6
  ||
4.3.7-rc 4.2.7   <- this branch is thrown away after 4.4.0 is released
  |
4.4.0

So, you see, you can only get v4.10.17 from the stable release.

see:
(1) https://github.com/gregkh/kernel-development
(2) https://www.kernel.org/doc/html/v4.11/process/2.Process.html

Yubin

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: OOM killer hung the whole system

2017-07-25 Thread Yubin Ruan
2017-07-25 17:59 GMT+08:00 Rock Lee :
> Hi,
>
> I was using a program to test OOM killer, but OOM killer hung my board.  The
> test snippet is very simple, just malloc() without free().
>
>   6 int i=0;
>   7 char *ptrtest=NULL;
>   8  while (1)
>   9  {
>  10ptrtest = malloc(0x1000);
>  11if (ptrtest == NULL)
>  12printf("malloc failed.\n");
>  13  }
>  14  return 0;
>  15
>
> After I executed this program(a.out), there is no reaction of my shell. Only
> this messege was shown:
>
> [  180.138188] Out of memory: Kill process 2706 (qq) score 623 or sacrifice
> child
> [  180.164230] Killed process 2706 (qq) total-vm:98156kB, anon-rss:96400kB,
> file-rss:4kB
>
> I think it must be some problem with OOM killer, and tried a lot of way to
> get some infomation. And I got this:
>
> ===
> Process: a.out, cpu: 0 pid: 1463 start: 0xd5849b00
> =
> Task name: a.out pid: 1463 cpu: 0
> state: 0x2 exit_state: 0x0 stack base: 0xd619
> Stack:
> [] __schedule+0x2c8
> [] squashfs_cache_get+0x108
> [] squashfs_readpage_block+0x28
> [] squashfs_readpage+0x624
> [] __do_page_cache_readahead+0x228
> [] filemap_fault+0x1d4
> [] __do_fault+0x34
> [] do_read_fault+0x19c
> [] handle_mm_fault+0x468
> [] do_page_fault+0x11c
> [] do_PrefetchAbort+0x34
> [] ret_from_exception+0x0
>
> I am suprised, because a.out is in /tmp, there is no relation between a.out
> and squashfs(my rootfs). Could anyone give me a hint ? Is the problem of
> squashfs or OOM killer.

You say your rootfs is squashfs filesystem. Is /tmp using the same
device and same filesystem (i.e., squashfs) ?

Yubin

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


OOM killer hung the whole system

2017-07-25 Thread Rock Lee
Hi,

I was using a program to test OOM killer, but OOM killer hung my board.
The test snippet is very simple, just malloc() without free().

  6 int i=0;
  7 char *ptrtest=NULL;
  8  while (1)
  9  {
 10ptrtest = malloc(0x1000);
 11if (ptrtest == NULL)
 12printf("malloc failed.\n");
 13  }
 14  return 0;
 15

After I executed this program(a.out), there is no reaction of my shell.
Only this messege was shown:

[  180.138188] Out of memory: Kill process 2706 (qq) score 623 or sacrifice
child
[  180.164230] Killed process 2706 (qq) total-vm:98156kB, anon-rss:96400kB,
file-rss:4kB

I think it must be some problem with OOM killer, and tried a lot of way to
get some infomation. And I got this:

===
Process: a.out, cpu: 0 pid: 1463 start: 0xd5849b00
=
Task name: a.out pid: 1463 cpu: 0
state: 0x2 exit_state: 0x0 stack base: 0xd619
Stack:
[] __schedule+0x2c8
[] squashfs_cache_get+0x108
[] squashfs_readpage_block+0x28
[] squashfs_readpage+0x624
[] __do_page_cache_readahead+0x228
[] filemap_fault+0x1d4
[] __do_fault+0x34
[] do_read_fault+0x19c
[] handle_mm_fault+0x468
[] do_page_fault+0x11c
[] do_PrefetchAbort+0x34
[] ret_from_exception+0x0

I am suprised, because a.out is in /tmp, there is no relation between a.out
and squashfs(my rootfs). Could anyone give me a hint ? Is the problem of
squashfs or OOM killer.
-- 
Cheers,
Rock
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Need help to understand Linux kernel source versioning systems

2017-07-25 Thread Kamil Konieczny
On 24.07.2017 14:56, vibnwis wrote:

> Being a newbie, I encountered the following scenarios when tracing
> build_kernel.sh script from eewiki. Would someone help me to understand why
> please? From my experience, I would to summarize the following scenario.
> 
> 1. First, source is cloned from
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git and
> checked for release version, "v4.10.17". Obviously it has no kernel tag of
> "v4.10.17", but "v4.10" [...]

You should stick to longterm or current branch,
see https://www.kernel.org/

note that stable can be End-of-Life = EOL

stable: 4.12.3  2017-07-21
stable: 4.11.12 [EOL]   2017-07-21
longterm:   4.9.39  2017-07-21

Best regards,
Kamil

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies