From mulyadi.santosa at gmail.com Mon Feb 1 03:42:57 2016 From: mulyadi.santosa at gmail.com (Mulyadi Santosa) Date: Mon, 1 Feb 2016 15:42:57 +0700 Subject: swap test for cgroups In-Reply-To: References: Message-ID: On Sun, Jan 31, 2016 at 3:18 PM, Kevin Wilson wrote: > Hi, > > I had tried to perform the following test according to: > http://lxr.free-electrons.com/source/Documentation/cgroups/memcg_test.txt#L211 > mkdir /sys/fs/cgroup/memory/group1 > > echo $$ > /sys/fs/cgroup/memory/group1/cgroup.procs Hi... maybe you should test with "echo 0" like mentioned in the example? IMHO, echo $$ will yield PID of your current PID of task invocation in bash, and I think that's different with the PID of malloc program you ran. hence the result you saw > > echo 40M > /sys/fs/cgroup/memory/group1/memory.limit_in_bytes > > Run a process which is a very short program, allocating 100MB: > int main() { > // Allocate 100 MB > void *mem = malloc(1024*1024*100); > if (mem) > printf("malloc is ok\n"); > pause(); > } > > > VmSize seems a bit larger than 100MB, and this seems ok, when adding > the overhead of running a process: > cat /proc/$$/status | grep VmSize > VmSize: 116920 kB > > > > cat /sys/fs/cgroup/memory/group1/memory.stat | grep swap > swap 0 > total_swap 0 > > cat /proc/$$/status | grep -i swap > VmSwap: 0 kB > > > I would expect that the swap will be 60M according to the link to the > memcg_test.txt mentioned earlier. > > Any ideas ? > > Regards, > Kevin > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com
This email has been sent from a virus-free computer protected by Avast.
www.avast.com
From vishu.kernel at gmail.com Mon Feb 1 04:47:59 2016 From: vishu.kernel at gmail.com (Vishwas Srivastava) Date: Mon, 1 Feb 2016 15:17:59 +0530 Subject: Query Regarding memory alignment /access Message-ID: Hi All, I have 2 questions regarding memory access/alignment 1: can aligned/unaligned virtual address could translate to unaligned/aligned physical address ? or aligned virtual --- > aligned phy and unaligned virtual --- > unaligned phy ?? 2: Since the cpu access the memory in word size, for a large buffer, (say size N bytes where N > wordsize) isn't it sufficient for buffer to be properly aligned if its address % WORD_SIZE == 0? rather than address % N == 0 check?? since cpu, anyways will not access more than word size at a time so any address which is divisible by wordsize is by default properly aligned? Please share your inputs. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160201/301adbef/attachment.html From nobumasa.bcc at gmail.com Mon Feb 1 14:40:15 2016 From: nobumasa.bcc at gmail.com (Airton Ishimori) Date: Mon, 1 Feb 2016 16:40:15 -0300 Subject: Problem with GSO Message-ID: Hi, everyone, I need a help. Anyone who could give me advices or a possible way to find a solution for my problem, would be appreciated. I think I'm getting trouble with a bad use of GSO/GRO. Firstly, I'm putting a piece of the dmesg output that I always get when I make a ping between two terminals. Command used: ping -s 1500 10.0.0.20 PING 10.0.0.20 (10.0.0.20) 1500(1528) bytes of data. 1508 bytes from 10.0.0.20: icmp_seq=3 ttl=64 time=0.161 ms 1508 bytes from 10.0.0.20: icmp_seq=4 ttl=64 time=0.165 ms 1508 bytes from 10.0.0.20: icmp_seq=5 ttl=64 time=0.209 ms dmesg Output: [ 1495.678355] ------------[ cut here ]------------ [ 1495.678364] WARNING: CPU: 0 PID: 1511 at /build/buildd/linux-lts-utopic-3.16.0/net/core/dev.c:2246 skb_warn_bad_offload+0xd0/0xd8() [ 1495.678368] : caps=(0x00000184075b59e9, 0x0000000000000000) *len=1522 data_len=0 gso_size=1460 gso_type=0 ip_summed=0* [ 1495.678370] Modules linked in: openvswitch(OE) veth libcrc32c bnep rfcomm bluetooth 6lowpan_iphc snd_hda_codec_realtek snd_hda_codec_generic snd_hda_intel snd_hda_controller snd_hda_codec snd_hwdep snd_pcm i915 snd_seq_midi snd_seq_midi_event gpio_ich snd_rawmidi snd_seq snd_seq_device coretemp video snd_timer drm_kms_helper kvm_intel drm snd lpc_ich kvm soundcore serio_raw i2c_algo_bit shpchp mac_hid parport_pc ppdev lp parport psmouse pata_acpi r8169 mii [last unloaded: openvswitch] [ 1495.678410] CPU: 0 PID: 1511 Comm: handler43 Tainted: G W OE 3.16.0-30-generic #40~14.04.1-Ubuntu [ 1495.678412] Hardware name: /DG41AN, BIOS ANG4110H.86A.0018.2011.0325.1148 03/25/2011 [ 1495.678415] 00000000 00000000 f6b0d944 c168b423 f6b0d984 f6b0d974 c105c2ae c191ac74 [ 1495.678421] f6b0d9a0 000005e7 c191abfc 000008c6 c168e03e c168e03e f3df4000 f6aef3c0 [ 1495.678428] 000005b4 f6b0d98c c105c303 00000009 f6b0d984 c191ac74 f6b0d9a0 f6b0d9e0 [ 1495.678434] Call Trace: [ 1495.678439] [] dump_stack+0x41/0x52 [ 1495.678444] [] warn_slowpath_common+0x7e/0xa0 [ 1495.678449] [] ? skb_warn_bad_offload+0xd0/0xd8 [ 1495.678452] [] ? skb_warn_bad_offload+0xd0/0xd8 [ 1495.678456] [] warn_slowpath_fmt+0x33/0x40 [ 1495.678459] [] skb_warn_bad_offload+0xd0/0xd8 [ 1495.678464] [] __skb_gso_segment+0x78/0xb0 [ 1495.678474] [] rpl__skb_gso_segment+0x81/0xc0 [*openvswitch*] [ 1495.678481] [] rpl_dev_queue_xmit+0xa2/0x140 [*openvswitch*] [ 1495.678488] [] netdev_send+0x65/0xc0 [*openvswitch*] [ 1495.678495] [] ovs_vport_send+0x11/0x60 [*openvswitch*] The ping happens after a few seconds, but when I try a ping for the first time, usually 2 or 3 (first) packets are lost and then they keep pinging to each other. The delay is quite high because I'm using 'printks'. Now, let me explain what I've been doing. I'm basically adding a new header (8 bytes size) to the IPv4 packets which goes between L2 and L3, similarly to VLAN. Then, I use Open vSwich (OVS) to keep forwarding my packets. For packet size below MTU size, I have no problem. However, the problem shows up when I try to send a packet having a higher value than the standard MTU (1500 B). One of the questions that I have is, how to use GSO properly? With my understanding, I can segment larger packets before calling *dev_queue_xmit()* or *dev_hard_start_xmit()*, or even before a device driver specific function. OVS has support for earlier versions of the Linux kernel. I'm using int rpl_dev_queue_xmit(struct sk_buff *skb) { #undef dev_queue_xmit int err = -ENOMEM; bool vlan, mpls; vlan = mpls = false; /* Avoid traversing any VLAN tags that are present to determine if * the ethtype is MPLS. Instead compare the mac_len (end of L2) and * skb_network_offset() (beginning of L3) whose inequality will * indicate the presence of an MPLS label stack. */ if (skb->mac_len != skb_network_offset(skb) && !supports_mpls_gso()) mpls = true; if (skb_vlan_tag_present(skb) && !dev_supports_vlan_tx(skb->dev)) vlan = true; if (vlan || mpls) { int features; features = netif_skb_features(skb); if (vlan) { if (!vlan_tso) features &= ~(NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_UFO | NETIF_F_FSO); skb = vlan_insert_tag_set_proto(skb, skb->vlan_proto, skb_vlan_tag_get(skb)); if (unlikely(!skb)) return err; vlan_set_tci(skb, 0); } /* As of v3.11 the kernel provides an mpls_features field in * struct net_device which allows devices to advertise which * features its supports for MPLS. This value defaults to * NETIF_F_SG and as of v3.19. * * This compatibility code is intended for kernels older * than v3.19 that do not support MPLS GSO and do not * use mpls_features. Thus this code uses NETIF_F_SG * directly in place of mpls_features. */ if (mpls) features &= NETIF_F_SG; if (*netif_needs_gso(skb, features)*) { struct sk_buff *nskb; nskb = *skb_gso_segment*(skb, features); if (!nskb) { if (unlikely(skb_cloned(skb) && pskb_expand_head(skb, 0, 0, GFP_ATOMIC))) goto drop; skb_shinfo(skb)->gso_type &= ~SKB_GSO_DODGY; goto xmit; } if (IS_ERR(nskb)) { err = PTR_ERR(nskb); goto drop; } consume_skb(skb); skb = nskb; do { nskb = skb->next; skb->next = NULL; err = dev_queue_xmit(skb); skb = nskb; } while (skb); return err; } } xmit: return *dev_queue_xmit(skb);* drop: kfree_skb(skb); return err; } My initial idea was to prepare a packet before entering in the code lines in red, but I noticed that netif_needs_gso() requires *skb->gso_size* to be set, if I'm not making a mistake. So, another question is, how to set GSO size properly? At first, I thought I could use any size below MTU, but it seems that is not the case. Besides, for the kernel to properly segment packets according to the Ethertype, I think the kernel must be able to advance the new header, so I modified *skb_mac_gso_segment()* and *skb_network_protocol() *which comes after *skb_gso_segment()* in the kernel [version 3.16 (Ubuntu)]. However, I'm still getting the same dmesg output. As the new header goes in the same place of VLAN, with 8 bytes between L2 and L3, when the packets are segmented, each segment will have L2+New_Header attached to them (until where I know). I checked skb_mac_gso_segment() and I noticed that there is a GSO segment callback for each L3 protocol type. So, I make assumptions that GSO actually happens for protocols above L2, I mean from L3 ahead. My understanding is right? Any help would be very appreciated, Thanks a lot, *--*Airton Ishimori -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160201/d5497224/attachment-0001.html From asharaf at tataelxsi.co.in Tue Feb 2 01:46:33 2016 From: asharaf at tataelxsi.co.in (Asharaf P) Date: Tue, 2 Feb 2016 06:46:33 +0000 Subject: SPI Slave Patch - Kernel Version Message-ID: Hai, I was looking for SPI slave support and found some patches at linux-spi mailing list[1]. I am using custom branch[2] from freescale based on 3.14, on which the above patch failed, so how can i find the base version of the above patch set, also can anyone help me to find the status of the patchset, because i didn't find it merged on any tree. [1] : http://marc.info/?l=linux-arm-kernel&m=144320405317902&w=2 [2] : http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/log/?h=imx_3.14.38_6qp_ga Regards Asharaf P From sandro.stiller at elfin.de Tue Feb 2 04:09:20 2016 From: sandro.stiller at elfin.de (Sandro Stiller) Date: Tue, 2 Feb 2016 10:09:20 +0100 Subject: How to find a bug with lost network messages Message-ID: <56B07240.8070409@elfin.de> Hello, I'm struggeling with a network driver (sllin[1]) which is not in the official kernel. It has a lot in common with the slcan driver but is used for LIN networks. The problem is, that sometimes messages sent to the network layer via netif_rx() don't arrive in all listening programs. This is how the driver works: 1. The application sends CAN messages to the network interface 2. The driver forwards it to the UART (tty) 3. The UART receives the same message (single-wire connection, RX and TX connected) and sends it back to the network layer 4. The sending application receives the previously sent message and can check for transmission errors and appended LIN slave replies. Sometimes the last point (4.) does not work after 10 - 40 seconds of transmission. The application does not receive the message using a blocking read() on the socket, but other processes receive it (running candump on the interface). netif_rx() always returns 0. If more programs are listening (running multiple instances of candump), the problem appears less often or never. On my PC there is no problem, it occures on ARM only. I'm using kernel 4.1. Can you give me a hint where to search for the cause of this behaviour? Thank you very much. Sandro [1]: https://github.com/sstiller/sllin/tree/master/sllin From a.pichlkostner at gmx.de Tue Feb 2 14:05:58 2016 From: a.pichlkostner at gmx.de (Arthur Pichlkostner) Date: Tue, 2 Feb 2016 20:05:58 +0100 Subject: How to find a bug with lost network messages In-Reply-To: <56B07240.8070409@elfin.de> References: <56B07240.8070409@elfin.de> Message-ID: <20160202190558.GA1881@debi5.lan> I just know that netif_rx() should be updated to netif_rx_ni() for newer kernels. Without the change I had NOHZ errors in the log, the same change was done in SLCAN. Maybe this is the origin of your problem. You can try our fork on https://github.com/tjohann/sllin which includes many improvents and fixes compared to the original driver from 2013. On Tue, Feb 02, 2016 at 10:09:20AM +0100, Sandro Stiller wrote: > Hello, > > I'm struggeling with a network driver (sllin[1]) which is not in the > official kernel. > It has a lot in common with the slcan driver but is used for LIN networks. > The problem is, that sometimes messages sent to the network layer via > netif_rx() don't arrive in all listening programs. > > This is how the driver works: > 1. The application sends CAN messages to the network interface > 2. The driver forwards it to the UART (tty) > 3. The UART receives the same message (single-wire connection, RX and TX > connected) and sends it back to the network layer > 4. The sending application receives the previously sent message and can > check for transmission errors and appended LIN slave replies. > > Sometimes the last point (4.) does not work after 10 - 40 seconds of > transmission. > The application does not receive the message using a blocking read() on > the socket, but other processes receive it (running candump on the > interface). netif_rx() always returns 0. > > If more programs are listening (running multiple instances of candump), > the problem appears less often or never. > On my PC there is no problem, it occures on ARM only. > I'm using kernel 4.1. > > Can you give me a hint where to search for the cause of this behaviour? > > Thank you very much. > > Sandro > > > [1]: https://github.com/sstiller/sllin/tree/master/sllin > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies From ranshalit at gmail.com Fri Feb 5 03:53:51 2016 From: ranshalit at gmail.com (Ran Shalit) Date: Fri, 5 Feb 2016 10:53:51 +0200 Subject: dma_alloc_coherent Message-ID: Hello, I read the readme about dma API, but still don't understand how it should be used It is said that dma_alloc_coherent is responsible for allocating the buffer. 1. But how to trigger the dma transaction to start ? 2. Is there a callback when it is finished ? Thank you, Ran From kirjanov at gmail.com Fri Feb 5 04:15:33 2016 From: kirjanov at gmail.com (Denis Kirjanov) Date: Fri, 5 Feb 2016 12:15:33 +0300 Subject: dma_alloc_coherent In-Reply-To: References: Message-ID: On 2/5/16, Ran Shalit wrote: > Hello, > > I read the readme about dma API, but still don't understand how it > should be used > It is said that dma_alloc_coherent is responsible for allocating the > buffer. > > 1. But how to trigger the dma transaction to start ? > 2. Is there a callback when it is finished ? It's used for data transfer between IO device and system memory. You allocate a kernel buffer for DMA transaction (in this case dma from device to system memory) and setup your device for dma transfer. An IO device usually generates an interrupt when DMA transfer completes. > > Thank you, > Ran > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -- Regards / Mit besten Gr??en, Denis From harish.b310 at gmail.com Fri Feb 5 13:35:19 2016 From: harish.b310 at gmail.com (Harish) Date: Sat, 6 Feb 2016 00:05:19 +0530 Subject: Sleep_on_buffer Message-ID: <9529508C-FA00-4F3A-8872-0EC43882C36C@gmail.com> Hi, I see this(sleep_on_buffer) in the /proc//wchan for a process, could some one help me understand what does this exactly mean? Around this time the thread was actually trying write to the console. The status of the process from /proc says "Disk Sleeping" Thanks, Harish From mashemat at gmail.com Fri Feb 5 13:49:19 2016 From: mashemat at gmail.com (masoud hematpour) Date: Fri, 5 Feb 2016 19:49:19 +0100 Subject: Memory Management Message-ID: Hi, I am beginner to kernel source. I decide to work on Performance Tuning. I studied some material around memory management but which material is well described for Memory management in Linux? Thank you, masoud -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160205/2bf7baf3/attachment.html From ranshalit at gmail.com Sat Feb 6 14:22:49 2016 From: ranshalit at gmail.com (Ran Shalit) Date: Sat, 6 Feb 2016 21:22:49 +0200 Subject: dma_alloc_coherent In-Reply-To: References: Message-ID: On Fri, Feb 5, 2016 at 11:15 AM, Denis Kirjanov wrote: > On 2/5/16, Ran Shalit wrote: >> Hello, >> >> I read the readme about dma API, but still don't understand how it >> should be used >> It is said that dma_alloc_coherent is responsible for allocating the >> buffer. > >> >> 1. But how to trigger the dma transaction to start ? >> 2. Is there a callback when it is finished ? > > It's used for data transfer between IO device and system memory. You > allocate a kernel buffer for DMA transaction (in this case dma from > device to system memory) and setup your device for dma transfer. An IO > device usually generates an interrupt when DMA transfer completes. > Denis If I understand correctly the full picture how to use dma is as following (schematics): buf = dma_alloc_coherent(); <<-- done once at the lifetime every time we need to trigger dma: //start transaction now writeb(buf, DMA_ADDR) <<- juat an example, actually it is totally depends on dma device writeb(START_DMA, DMA_ADDR+2) <<- juat an example, actually it is totally depends on dma device //usually we also register on irq for callback on finishing the transaction. hope I got it all correct, if you have any comments please add. Thanks, Ran From me at tobin.cc Sun Feb 7 16:12:42 2016 From: me at tobin.cc (Tobin Harding) Date: Mon, 8 Feb 2016 08:12:42 +1100 Subject: mkinitcpio Message-ID: <20160207211242.GA14144@eros.fritz.box> Hi, I have a kernel build question please. After build and install of new kernel and modules mkinitcpio gives the following warning ==> WARNING: No modules were added to the image. This is probably not what you want. Web search did not turn up anything. Complete command and output is: # mkinitcpio -g initramfs-custom.img -k 4.5.0-eudyptula+ ==> Starting build: 4.5.0-eudyptula+ -> Running build hook: [base] -> Running build hook: [udev] -> Running build hook: [autodetect] -> Running build hook: [modconf] -> Running build hook: [block] -> Running build hook: [filesystems] -> Running build hook: [keyboard] -> Running build hook: [fsck] ==> WARNING: No modules were added to the image. This is probably not what you want. ==> Creating gzip-compressed initcpio image: /boot/initramfs-custom.img ==> Image generation successful # Any pointers much appreciated, thank you. Tobin -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 801 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160208/a35aeac2/attachment.bin From mkhasaw1 at binghamton.edu Sun Feb 7 16:24:08 2016 From: mkhasaw1 at binghamton.edu (Mohammad A Khasawneh) Date: Sun, 7 Feb 2016 16:24:08 -0500 Subject: Virtual and physical page address Message-ID: Hello everyone, I am attempting to dump the page table of a process in terms of virtual addresses and the corresponding physical addresses. I am looking for information whether the pointers I am using are correct for this purpose: 1. Can I say that pte_page(pte_t) returns the virtual address of the page that the PTE points at? 2. can I say that page_to_phys(struct page) returns the physical address of that same entry? Thank you, Mohammad -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160207/97f36a47/attachment.html From krinkin.m.u at gmail.com Sun Feb 7 16:43:30 2016 From: krinkin.m.u at gmail.com (Mike Krinkin) Date: Mon, 8 Feb 2016 00:43:30 +0300 Subject: Virtual and physical page address In-Reply-To: References: Message-ID: <20160207214329.GA20374@kmu-tp-x230> On Sun, Feb 07, 2016 at 04:24:08PM -0500, Mohammad A Khasawneh wrote: > Hello everyone, > > I am attempting to dump the page table of a process in terms of virtual > addresses and the corresponding physical addresses. I am looking for > information whether the pointers I am using are correct for this purpose: > > 1. Can I say that pte_page(pte_t) returns the virtual address of the page > that the PTE points at? pte_page returns struct page pointer (virtual address of the struct page, but i suppose it's not the virtual address you need), it has nothing to do with a virtual address the pte corresponds to. > > 2. can I say that page_to_phys(struct page) returns the physical address of > that same entry? page_to_phys returns physical address the struct page corresponds to, so yes. > > Thank you, > Mohammad > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies From pggllrd at gmail.com Sun Feb 7 17:16:46 2016 From: pggllrd at gmail.com (Pablo G. Gallardo) Date: Sun, 07 Feb 2016 20:16:46 -0200 Subject: mkinitcpio In-Reply-To: <20160207211242.GA14144@eros.fritz.box> References: <20160207211242.GA14144@eros.fritz.box> Message-ID: <996485F3-18E9-49E5-845F-66056263B41C@gmail.com> Em 7 de fevereiro de 2016 19:12:42 BRST, Tobin Harding escreveu: >Hi, > >I have a kernel build question please. After build and install of new >kernel and >modules mkinitcpio gives the following warning > >==> WARNING: No modules were added to the image. This is probably not >what you >want. > >Web search did not turn up anything. > >Complete command and output is: > ># mkinitcpio -g initramfs-custom.img -k 4.5.0-eudyptula+ >==> Starting build: 4.5.0-eudyptula+ > -> Running build hook: [base] > -> Running build hook: [udev] > -> Running build hook: [autodetect] > -> Running build hook: [modconf] > -> Running build hook: [block] > -> Running build hook: [filesystems] > -> Running build hook: [keyboard] > -> Running build hook: [fsck] >==> WARNING: No modules were added to the image. This is probably not >what you want. >==> Creating gzip-compressed initcpio image: /boot/initramfs-custom.img >==> Image generation successful ># > >Any pointers much appreciated, thank you. > >Tobin > > >------------------------------------------------------------------------ > >_______________________________________________ >Kernelnewbies mailing list >Kernelnewbies at kernelnewbies.org >http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies Hello Tobin, Please post every step you took to build the kernel. Thanks, -- Pablo G. Gallardo From Valdis.Kletnieks at vt.edu Sun Feb 7 21:45:49 2016 From: Valdis.Kletnieks at vt.edu (Valdis.Kletnieks at vt.edu) Date: Sun, 07 Feb 2016 21:45:49 -0500 Subject: mkinitcpio In-Reply-To: <20160207211242.GA14144@eros.fritz.box> References: <20160207211242.GA14144@eros.fritz.box> Message-ID: <188942.1454899549@turing-police.cc.vt.edu> On Mon, 08 Feb 2016 08:12:42 +1100, Tobin Harding said: > ==> WARNING: No modules were added to the image. This is probably not what you want. This may or may not be an error. A distro kernel is usually built with all or almost all drivers built as modules, so an init image that has no modules in it will probably fail to boot correctly. However, if it's a self-built kernel that has all drivers needed to get the root filesystem mounted already built-in, it's not a real issue. If it's intended because things are built in, your mkinitcpio probably has a flag to tell it that it's OK (n dracut, it's --no-kernel). -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 848 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160207/a0ad9fb9/attachment.bin From vishu.kernel at gmail.com Sun Feb 7 23:01:40 2016 From: vishu.kernel at gmail.com (Vishwas Srivastava) Date: Mon, 8 Feb 2016 09:31:40 +0530 Subject: dma_alloc_coherent Message-ID: Hi Ran, the api which you have mentioned... void * dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flag) is the kernel api to alloc consistent memory. DMA devices understand the physical addresses not the virtual addresses. which means that we must supply to the dma device, the physical address, to read from or to write to. The second argument of this api is an input argument which is updated by the kernel if this api returns a success (and contains the physical base address of the allocated memory) and the returned value of this api is the kernel virtual address. if the *CPU* has to operate on this memory (assume that the memory is dma'ed by the dma device and cpu want to read it for further processing ) it should use the virtual address, so the returned value of this api, as the base address. However, if the dma device has to operate on this memory (assume device want to write to this memory), it should use the *dma_handle* , which is the physical address (base) of the dma memory. Now the question is how the dma device knows about this *physical* address? The answer is that the "dma controller" register would have a register to accept this physical address. So the sequence of steps probably would be, in your case: 1: allocate the dma memory 2: programme the dma controller register with the physical address returned by this api, plus the size of the transaction and may be some more registers for setting some kind of flags (depends on your dma device) 3: programme the dma controller's dma *start* bit. after this the dma starts and dma device starts writing to the memory . I hope, this clarifies you. On Sun, Feb 7, 2016 at 10:30 PM, wrote: > 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: dma_alloc_coherent (Ran Shalit) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sat, 6 Feb 2016 21:22:49 +0200 > From: Ran Shalit > Subject: Re: dma_alloc_coherent > To: Denis Kirjanov > Cc: kernelnewbies > Message-ID: > < > CAJ2oMhLi9LV6QQ-Yr1yNKgoBwC_ET-qTwDAGGrDc9BGZLKNNXA at mail.gmail.com> > Content-Type: text/plain; charset=UTF-8 > > On Fri, Feb 5, 2016 at 11:15 AM, Denis Kirjanov > wrote: > > On 2/5/16, Ran Shalit wrote: > >> Hello, > >> > >> I read the readme about dma API, but still don't understand how it > >> should be used > >> It is said that dma_alloc_coherent is responsible for allocating the > >> buffer. > > > >> > >> 1. But how to trigger the dma transaction to start ? > >> 2. Is there a callback when it is finished ? > > > > It's used for data transfer between IO device and system memory. You > > allocate a kernel buffer for DMA transaction (in this case dma from > > device to system memory) and setup your device for dma transfer. An IO > > device usually generates an interrupt when DMA transfer completes. > > Denis > > If I understand correctly the full picture how to use dma is as > following (schematics): > > buf = dma_alloc_coherent(); <<-- done once at the lifetime > > every time we need to trigger dma: > > //start transaction now > writeb(buf, DMA_ADDR) <<- juat an example, actually it is totally > depends on dma device > writeb(START_DMA, DMA_ADDR+2) <<- juat an example, actually it is > totally depends on dma device > > //usually we also register on irq for callback on finishing the > transaction. > > hope I got it all correct, if you have any comments please add. > > Thanks, > Ran > > > > ------------------------------ > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > > End of Kernelnewbies Digest, Vol 63, Issue 7 > ******************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160208/232c5080/attachment-0001.html From ranshalit at gmail.com Mon Feb 8 01:24:59 2016 From: ranshalit at gmail.com (Ran Shalit) Date: Mon, 8 Feb 2016 08:24:59 +0200 Subject: dma_alloc_coherent In-Reply-To: References: Message-ID: On Mon, Feb 8, 2016 at 6:01 AM, Vishwas Srivastava wrote: > Hi Ran, > the api which you have mentioned... > > void * > dma_alloc_coherent(struct device *dev, size_t size, > dma_addr_t *dma_handle, gfp_t flag) > > is the kernel api to alloc consistent memory. > > DMA devices understand the physical addresses not the virtual addresses. > > which means that we must supply to the dma device, the physical address, to > read > > from or to write to. > > The second argument of this api is an input argument which is updated > by the kernel if this api returns a success (and contains the physical base > address of the allocated memory) and the returned value of this api is the > kernel virtual address. > > if the *CPU* has to operate on this memory (assume that the memory is dma'ed > by the dma device and cpu want to read it for further processing ) it should > use the virtual address, so the returned value of this api, as the base > address. > However, if the dma device has to operate on this memory (assume device want > to write to this memory), it should use the *dma_handle* , which is the > physical address (base) of the dma memory. > > Now the question is how the dma device knows about this *physical* address? > The answer is that the "dma controller" register would have a register to > accept this physical address. > > So the sequence of steps probably would be, in your case: > 1: allocate the dma memory > 2: programme the dma controller register with the physical address returned > by this api, plus the size of the transaction and may be some more registers > for setting some kind of flags (depends on your dma device) > 3: programme the dma controller's dma *start* bit. > > after this the dma starts and dma device starts writing to the memory . > > > I hope, this clarifies you. > > Hi Vishwas, That's fully clarify the questions about dma_alloc_coherent. I also try to figure out what's the difference between dma_alloc_coherent and dma_map_single. I could not find and important difference between these two methods. 1. With both methods I stil need to program the dma controller with the physical address and the start trigger. 2. I can still do the allocation whenever I want with both methods (for example at the initialization of the driver), 3. Not sure what the actuall dma_map_single does (and if it really necessary to use it), becuase it seems I could just translate the virtual value from kmalloc into physical address and return it to the dma controller. Thank you for the time, Ran From saumendra.d at hcl.com Mon Feb 8 01:59:24 2016 From: saumendra.d at hcl.com (Saumendra Dash) Date: Mon, 8 Feb 2016 06:59:24 +0000 Subject: dma_alloc_coherent In-Reply-To: References: Message-ID: >> Hi Ran, > the api which you have mentioned... > >> void * >> dma_alloc_coherent(struct device *dev, size_t size, >> dma_addr_t *dma_handle, gfp_t flag) >> >> is the kernel api to alloc consistent memory. >> >> DMA devices understand the physical addresses not the virtual addresses. >> >> which means that we must supply to the dma device, the physical >> address, to read >> >> from or to write to. >> >> The second argument of this api is an input argument which is updated >> by the kernel if this api returns a success (and contains the physical >> base address of the allocated memory) and the returned value of this >> api is the kernel virtual address. >> >> if the *CPU* has to operate on this memory (assume that the memory is >> dma'ed by the dma device and cpu want to read it for further >> processing ) it should use the virtual address, so the returned value >> of this api, as the base address. >> However, if the dma device has to operate on this memory (assume >> device want to write to this memory), it should use the *dma_handle* , >> which is the physical address (base) of the dma memory. >> >> Now the question is how the dma device knows about this *physical* address? >> The answer is that the "dma controller" register would have a register >> to accept this physical address. >> >> So the sequence of steps probably would be, in your case: >> 1: allocate the dma memory >> 2: programme the dma controller register with the physical address >> returned by this api, plus the size of the transaction and may be some >> more registers for setting some kind of flags (depends on your dma >> device) >> 3: programme the dma controller's dma *start* bit. >> >> after this the dma starts and dma device starts writing to the memory . Hi Vishwas, >That's fully clarify the questions about dma_alloc_coherent. >I also try to figure out what's the difference between dma_alloc_coherent and dma_map_single. >I could not find and important difference between these two methods. >1. With both methods I stil need to program the dma controller with the physical address and the start trigger. >2. I can still do the allocation whenever I want with both methods (for example at the initialization of the driver), 3. Not sure what the actuall dma_map_single does (and if it really necessary to use it), becuase it >seems I could just translate the virtual value from kmalloc into physical address and return it to the dma controller. DMA transfers are done either in BURST mode or CYCLE STEALING mode. In Burst mode, the bus is captured for the entire duration of the transfer from the SRC to DST. In this case, the bus will be released when the Xfer is complete, so obviously it is not an efficient way of doing DMA. DMA_ALLOC_COHERENT() does this way. In Cycle Stealing mode, the DMA controller grab the bus when free, send a byte and then free the bus immediately. This process is repeated till the Xfer is complete, it is very efficient sine the bus is not grabbed for the entire transaction to complete. DMA_MAP_SINGLE() does this way. Hope this helps. Thanks, Saumendra ::DISCLAIMER:: ---------------------------------------------------------------------------------------------------------------------------------------------------- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses and other defects. ---------------------------------------------------------------------------------------------------------------------------------------------------- From gtvrreddy at gmail.com Mon Feb 8 03:08:34 2016 From: gtvrreddy at gmail.com (Ramana Reddy) Date: Mon, 8 Feb 2016 13:38:34 +0530 Subject: TCP_REPAIR code and how it works Message-ID: Hi All, Any one have an idea of hwo TCP_REPAIR works, and a working example of a client and multiple servers. Looking forward for your help. Thanks & Regards, Raman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160208/24cfb1c3/attachment.html From me at tobin.cc Mon Feb 8 03:30:28 2016 From: me at tobin.cc (Tobin Harding) Date: Mon, 8 Feb 2016 19:30:28 +1100 Subject: mkinitcpio In-Reply-To: <188942.1454899549@turing-police.cc.vt.edu> References: <20160207211242.GA14144@eros.fritz.box> <188942.1454899549@turing-police.cc.vt.edu> Message-ID: <20160208083028.GA1673@eros.fritz.box> Issue resolved thank you. I forgot to CC the list. Thanks also to Pablo G. Gallardo. Regards, Tobin Harding. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 801 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160208/489d3256/attachment.bin From mudongliangabcd at gmail.com Mon Feb 8 03:43:07 2016 From: mudongliangabcd at gmail.com (=?UTF-8?B?5oWV5Yas5Lqu?=) Date: Mon, 8 Feb 2016 16:43:07 +0800 Subject: Memory Management In-Reply-To: References: Message-ID: I think "Understanding The Linux Virtual Memory Manager" is a good choice. [1] Understanding The Linux Virtual Memory Manager: https://www.kernel.org/doc/gorman/pdf/understand.pdf 2016-02-06 2:49 GMT+08:00 masoud hematpour : > Hi, > > I am beginner to kernel source. I decide to work on Performance Tuning. I > studied some material around memory management but which material is well > described for Memory management in Linux? > > > Thank you, > > > masoud > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > -- My best regards to you. No System Is Safe! mudongliang -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160208/754449b1/attachment.html From varyani.nitin1 at gmail.com Mon Feb 8 03:50:44 2016 From: varyani.nitin1 at gmail.com (Nitin Varyani) Date: Mon, 8 Feb 2016 14:20:44 +0530 Subject: Process Scheduling Message-ID: Hi, I am new to kernel source. I want to plugin a new process scheduling algorithm. Can someone elaborate the steps to do it? Nitin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160208/7d7fdd93/attachment-0001.html From bjorn at mork.no Mon Feb 8 04:08:06 2016 From: bjorn at mork.no (=?utf-8?Q?Bj=C3=B8rn_Mork?=) Date: Mon, 08 Feb 2016 10:08:06 +0100 Subject: mkinitcpio In-Reply-To: <20160208083028.GA1673@eros.fritz.box> (Tobin Harding's message of "Mon, 8 Feb 2016 19:30:28 +1100") References: <20160207211242.GA14144@eros.fritz.box> <188942.1454899549@turing-police.cc.vt.edu> <20160208083028.GA1673@eros.fritz.box> Message-ID: <87zivb36yx.fsf@nemi.mork.no> Tobin Harding writes: > Issue resolved thank you. I forgot to CC the list. Thanks also to Pablo > G. Gallardo. Please give a summary of how the issue was resolved, even if it may seem obvious to you now. The problem was important enough for you to ask about, and you can be sure that you are not alone. The next person having the same problem will find your question. A nice gesture would be to let them find your answer as well... Bj?rn From sanjeevsharmaengg at gmail.com Mon Feb 8 05:35:25 2016 From: sanjeevsharmaengg at gmail.com (sanjeev sharma) Date: Mon, 8 Feb 2016 16:05:25 +0530 Subject: dma_alloc_coherent In-Reply-To: References: Message-ID: Hello Saumendra, I would suggest you to go through the following link: 1) This will explain need of DMA with practical scenario 2) ARM DMA Mapping with example https://sanjeevsharmaengg.wordpress.com/2014/08/26/why-dma-required-in-linux-kernel/ http://linuxkernelhacker.blogspot.in/2014/07/arm-dma-mapping-explained.html I hope these link will give you more confidence around understanding of DMA. Regards Sanjeev Sharma On Mon, Feb 8, 2016 at 12:29 PM, Saumendra Dash wrote: > >> Hi Ran, > > the api which you have mentioned... > > > >> void * > >> dma_alloc_coherent(struct device *dev, size_t size, > >> dma_addr_t *dma_handle, gfp_t flag) > >> > >> is the kernel api to alloc consistent memory. > >> > >> DMA devices understand the physical addresses not the virtual addresses. > >> > >> which means that we must supply to the dma device, the physical > >> address, to read > >> > >> from or to write to. > >> > >> The second argument of this api is an input argument which is updated > >> by the kernel if this api returns a success (and contains the physical > >> base address of the allocated memory) and the returned value of this > >> api is the kernel virtual address. > >> > >> if the *CPU* has to operate on this memory (assume that the memory is > >> dma'ed by the dma device and cpu want to read it for further > >> processing ) it should use the virtual address, so the returned value > >> of this api, as the base address. > >> However, if the dma device has to operate on this memory (assume > >> device want to write to this memory), it should use the *dma_handle* , > >> which is the physical address (base) of the dma memory. > >> > >> Now the question is how the dma device knows about this *physical* > address? > >> The answer is that the "dma controller" register would have a register > >> to accept this physical address. > >> > >> So the sequence of steps probably would be, in your case: > >> 1: allocate the dma memory > >> 2: programme the dma controller register with the physical address > >> returned by this api, plus the size of the transaction and may be some > >> more registers for setting some kind of flags (depends on your dma > >> device) > >> 3: programme the dma controller's dma *start* bit. > >> > >> after this the dma starts and dma device starts writing to the memory . > > Hi Vishwas, > > >That's fully clarify the questions about dma_alloc_coherent. > > >I also try to figure out what's the difference between dma_alloc_coherent > and dma_map_single. > > >I could not find and important difference between these two methods. > >1. With both methods I stil need to program the dma controller with the > physical address and the start trigger. > >2. I can still do the allocation whenever I want with both methods (for > example at the initialization of the driver), 3. Not sure what the actuall > dma_map_single does (and if it really necessary to use it), becuase it > >seems I could just translate the virtual value from kmalloc into physical > address and return it to the dma controller. > > DMA transfers are done either in BURST mode or CYCLE STEALING mode. > In Burst mode, the bus is captured for the entire duration of the > transfer from the SRC to DST. In this case, the bus will be released > when the Xfer is complete, so obviously it is not an efficient way of doing > DMA. DMA_ALLOC_COHERENT() does this way. > In Cycle Stealing mode, the DMA controller grab the bus when free, send a > byte and then free the bus immediately. This process is repeated till the > Xfer is complete, it is very efficient sine the bus is not grabbed for the > entire transaction to complete. DMA_MAP_SINGLE() does this way. > > Hope this helps. > > Thanks, > Saumendra > > > ::DISCLAIMER:: > > ---------------------------------------------------------------------------------------------------------------------------------------------------- > > The contents of this e-mail and any attachment(s) are confidential and > intended for the named recipient(s) only. > E-mail transmission is not guaranteed to be secure or error-free as > information could be intercepted, corrupted, > lost, destroyed, arrive late or incomplete, or may contain viruses in > transmission. The e mail and its contents > (with or without referred errors) shall therefore not attach any liability > on the originator or HCL or its affiliates. > Views or opinions, if any, presented in this email are solely those of the > author and may not necessarily reflect the > views or opinions of HCL or its affiliates. Any form of reproduction, > dissemination, copying, disclosure, modification, > distribution and / or publication of this message without the prior > written consent of authorized representative of > HCL is strictly prohibited. If you have received this email in error > please delete it and notify the sender immediately. > Before opening any email and/or attachments, please check them for viruses > and other defects. > > > ---------------------------------------------------------------------------------------------------------------------------------------------------- > > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160208/4ef37283/attachment.html From sanjeevsharmaengg at gmail.com Mon Feb 8 05:38:06 2016 From: sanjeevsharmaengg at gmail.com (sanjeev sharma) Date: Mon, 8 Feb 2016 16:08:06 +0530 Subject: Memory Management In-Reply-To: References: Message-ID: Hi, I would suggest you to go through the Linux Kernel book Robert Love which is simpler to understand. Regards Sanjeev Sharma On Mon, Feb 8, 2016 at 2:13 PM, ??? wrote: > I think "Understanding The Linux Virtual Memory Manager" is a good choice. > > [1] Understanding The Linux Virtual Memory Manager: > https://www.kernel.org/doc/gorman/pdf/understand.pdf > > 2016-02-06 2:49 GMT+08:00 masoud hematpour : > >> Hi, >> >> I am beginner to kernel source. I decide to work on Performance Tuning. I >> studied some material around memory management but which material is well >> described for Memory management in Linux? >> >> >> Thank you, >> >> >> masoud >> >> _______________________________________________ >> Kernelnewbies mailing list >> Kernelnewbies at kernelnewbies.org >> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies >> >> > > > -- > My best regards to you. > > No System Is Safe! > mudongliang > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160208/5dbe021d/attachment.html From rpjday at crashcourse.ca Mon Feb 8 06:28:29 2016 From: rpjday at crashcourse.ca (Robert P. J. Day) Date: Mon, 08 Feb 2016 06:28:29 -0500 Subject: Memory Management In-Reply-To: References: Message-ID: <20160208062829.140127bmsuknda68@astoria.ccjclearline.com> Quoting sanjeev sharma : > Hi, > > I would suggest you to go through the Linux Kernel book Robert Love which > is simpler to understand. just a caution that that book is starting to show its age, even though it's still really, really good. the memory management is probably still fairly current, but i would compare all code snippets against the current kernel just in case. rday From rahimi.nv at gmail.com Mon Feb 8 07:48:57 2016 From: rahimi.nv at gmail.com (navid Rahimi) Date: Mon, 8 Feb 2016 16:18:57 +0330 Subject: Memory Management In-Reply-To: <20160208062829.140127bmsuknda68@astoria.ccjclearline.com> References: <20160208062829.140127bmsuknda68@astoria.ccjclearline.com> Message-ID: On Mon, Feb 8, 2016 at 2:58 PM, Robert P. J. Day wrote: > Quoting sanjeev sharma : > >> Hi, >> >> I would suggest you to go through the Linux Kernel book Robert Love which >> is simpler to understand. > > just a caution that that book is starting to show its age, even though > it's still really, really good. the memory management is probably still > fairly current, but i would compare all code snippets against the > current kernel just in case. > > rday I did it, last year (almost), comparing code snippet in the book toward kernel source there (I think it was version 3.10 or maybe 4.0, I don't remember precisely), the code/topics is still relevant. I am not aware of the situation for 4.14 or newer version tough. best wishes, -navid From mkhasaw1 at binghamton.edu Mon Feb 8 08:57:01 2016 From: mkhasaw1 at binghamton.edu (Mohammad A Khasawneh) Date: Mon, 8 Feb 2016 08:57:01 -0500 Subject: Virtual and physical page address In-Reply-To: <20160207214329.GA20374@kmu-tp-x230> References: <20160207214329.GA20374@kmu-tp-x230> Message-ID: Thank you for your answer. Is there a way to get the virtual address by traversing the pgd->pte->page hierarchy? I'm not sure I can use the phys_to_virt() function. Thanks, Mohammad On Feb 7, 2016 16:43, "Mike Krinkin" wrote: > On Sun, Feb 07, 2016 at 04:24:08PM -0500, Mohammad A Khasawneh wrote: > > Hello everyone, > > > > I am attempting to dump the page table of a process in terms of virtual > > addresses and the corresponding physical addresses. I am looking for > > information whether the pointers I am using are correct for this purpose: > > > > 1. Can I say that pte_page(pte_t) returns the virtual address of the page > > that the PTE points at? > > pte_page returns struct page pointer (virtual address of the struct page, > but > i suppose it's not the virtual address you need), it has nothing to do > with a > virtual address the pte corresponds to. > > > > > 2. can I say that page_to_phys(struct page) returns the physical address > of > > that same entry? > > page_to_phys returns physical address the struct page corresponds to, so > yes. > > > > > Thank you, > > Mohammad > > > _______________________________________________ > > Kernelnewbies mailing list > > Kernelnewbies at kernelnewbies.org > > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160208/6ac720c6/attachment.html From krinkin.m.u at gmail.com Mon Feb 8 09:10:37 2016 From: krinkin.m.u at gmail.com (Mike Krinkin) Date: Mon, 8 Feb 2016 17:10:37 +0300 Subject: Virtual and physical page address In-Reply-To: References: <20160207214329.GA20374@kmu-tp-x230> Message-ID: <20160208141037.GB20374@kmu-tp-x230> On Mon, Feb 08, 2016 at 08:57:01AM -0500, Mohammad A Khasawneh wrote: > Thank you for your answer. Is there a way to get the virtual address by > traversing the pgd->pte->page hierarchy? Well, position of pte in the hierarchy defines the virtual address, so yes, there is way. I'm not sure that a portable across different architetures way exists though. You can look at this reference: https://www.kernel.org/doc/gorman/html/understand/understand006.html > I'm not sure I can use the phys_to_virt() function. In general you can't. > > Thanks, > Mohammad > On Feb 7, 2016 16:43, "Mike Krinkin" wrote: > > > On Sun, Feb 07, 2016 at 04:24:08PM -0500, Mohammad A Khasawneh wrote: > > > Hello everyone, > > > > > > I am attempting to dump the page table of a process in terms of virtual > > > addresses and the corresponding physical addresses. I am looking for > > > information whether the pointers I am using are correct for this purpose: > > > > > > 1. Can I say that pte_page(pte_t) returns the virtual address of the page > > > that the PTE points at? > > > > pte_page returns struct page pointer (virtual address of the struct page, > > but > > i suppose it's not the virtual address you need), it has nothing to do > > with a > > virtual address the pte corresponds to. > > > > > > > > 2. can I say that page_to_phys(struct page) returns the physical address > > of > > > that same entry? > > > > page_to_phys returns physical address the struct page corresponds to, so > > yes. > > > > > > > > Thank you, > > > Mohammad > > > > > _______________________________________________ > > > Kernelnewbies mailing list > > > Kernelnewbies at kernelnewbies.org > > > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > > > From pggllrd at gmail.com Mon Feb 8 11:27:28 2016 From: pggllrd at gmail.com (Pablo G. Gallardo) Date: Mon, 08 Feb 2016 14:27:28 -0200 Subject: mkinitcpio In-Reply-To: <20160208010754.GA856@eros.fritz.box> References: <20160207211242.GA14144@eros.fritz.box> <996485F3-18E9-49E5-845F-66056263B41C@gmail.com> <20160208010754.GA856@eros.fritz.box> Message-ID: <4A4239A6-DFE8-4C26-99C4-D6439AB91669@gmail.com> Em 7 de fevereiro de 2016 23:07:54 BRST, Tobin Harding escreveu: >> >> Please post every step you took to build the kernel. >> >> Thanks, >> -- >> Pablo G. Gallardo > >Hi Pablo, > >Thanks for the reply. While typing out a response to you with my build >steps I >found the problem > >$ zcat /proc/config.gz > config > >Should have been .config > >Thanks again (I'm emailing you from the new running kernel!) > >Tobin Hello Tobin, Nice! I'm copying the mailing list so if anyone else has this problem, they'll know where to start looking. Regards, -- Pablo G. Gallardo From sudipm.mukherjee at gmail.com Mon Feb 8 12:03:14 2016 From: sudipm.mukherjee at gmail.com (Sudip Mukherjee) Date: Mon, 8 Feb 2016 22:33:14 +0530 Subject: mkinitcpio In-Reply-To: <20160207211242.GA14144@eros.fritz.box> References: <20160207211242.GA14144@eros.fritz.box> Message-ID: On Mon, Feb 8, 2016 at 2:42 AM, Tobin Harding wrote: > Hi, > > I have a kernel build question please. After build and install of new kernel and > modules mkinitcpio gives the following warning > > ==> WARNING: No modules were added to the image. This is probably not what you > want. > > Web search did not turn up anything. > > Complete command and output is: > > # mkinitcpio -g initramfs-custom.img -k 4.5.0-eudyptula+ Is it a task of the Eudyptula Challenge? Regards Sudip From me at tobin.cc Tue Feb 9 00:13:23 2016 From: me at tobin.cc (me at tobin.cc) Date: Tue, 09 Feb 2016 16:13:23 +1100 Subject: mkinitcpio In-Reply-To: References: <20160207211242.GA14144@eros.fritz.box> Message-ID: <1454994803.601775.515857066.3E67DA9C@webmail.messagingengine.com> Re-stating initial problem. I was receiving a warning when running From me at tobin.cc Tue Feb 9 00:16:35 2016 From: me at tobin.cc (me at tobin.cc) Date: Tue, 09 Feb 2016 16:16:35 +1100 Subject: mkinitcpio In-Reply-To: <1454994803.601775.515857066.3E67DA9C@webmail.messagingengine.com> References: <20160207211242.GA14144@eros.fritz.box> <1454994803.601775.515857066.3E67DA9C@webmail.messagingengine.com> Message-ID: <1454994995.602321.515857554.3A93FDEA@webmail.messagingengine.com> I am glad this is the newbies list ;) The initial problem was # mkinitcpio -g initramfs-custom.img -k 4.5.0-eudyptula+ ==> Starting build: 4.5.0-eudyptula+ -> Running build hook: [base] -> Running build hook: [udev] -> Running build hook: [autodetect] -> Running build hook: [modconf] -> Running build hook: [block] -> Running build hook: [filesystems] -> Running build hook: [keyboard] -> Running build hook: [fsck] ==> WARNING: No modules were added to the image. This is probably not what you want. ==> Creating gzip-compressed initcpio image: /boot/initramfs-custom.img ==> Image generation successful # The cause of the warning turned out to be that I had built the kernel with an 'empty' config file. $ zcat /proc/config > config instead of $ zcat /proc/config > .config (note the dot on config) If I was more experienced I would have realised this when the compile time was so short. It was only while replying to Pablo with the steps I had taken to build the kernel that I noticed my error. So, thank you to the kernelnewbies mailing list. Regards, Tobin Harding From me at tobin.cc Tue Feb 9 00:22:27 2016 From: me at tobin.cc (me at tobin.cc) Date: Tue, 09 Feb 2016 16:22:27 +1100 Subject: mkinitcpio In-Reply-To: References: <20160207211242.GA14144@eros.fritz.box> Message-ID: <1454995347.603320.515861386.57641CF1@webmail.messagingengine.com> > Is it a task of the Eudyptula Challenge? Hi Sudip, Yes this was for task 3 of the Eudyptula Challenge From ruben at mrbrklyn.com Tue Feb 9 00:43:22 2016 From: ruben at mrbrklyn.com (Ruben Safir) Date: Tue, 9 Feb 2016 00:43:22 -0500 Subject: mkinitcpio In-Reply-To: <1454994995.602321.515857554.3A93FDEA@webmail.messagingengine.com> References: <20160207211242.GA14144@eros.fritz.box> <1454994803.601775.515857066.3E67DA9C@webmail.messagingengine.com> <1454994995.602321.515857554.3A93FDEA@webmail.messagingengine.com> Message-ID: <56B97C7A.7020709@mrbrklyn.com> On 02/09/2016 12:16 AM, me at tobin.cc wrote: > I am glad this is the newbies list ;) > > The initial problem was > > # mkinitcpio -g initramfs-custom.img -k 4.5.0-eudyptula+ > ==> Starting build: 4.5.0-eudyptula+ > -> Running build hook: [base] > -> Running build hook: [udev] > -> Running build hook: [autodetect] > -> Running build hook: [modconf] > -> Running build hook: [block] > -> Running build hook: [filesystems] > -> Running build hook: [keyboard] > -> Running build hook: [fsck] > ==> WARNING: No modules were added to the image. This is probably not > what you want. > ==> Creating gzip-compressed initcpio image: /boot/initramfs-custom.img > ==> Image generation successful > # > > The cause of the warning turned out to be that I had built the kernel > with an 'empty' config file. > > $ zcat /proc/config > config > > instead of > > $ zcat /proc/config > .config > > (note the dot on config) > > If I was more experienced I would have realised this when the compile > time was so short. It was only while replying to Pablo with the steps I > had taken to build the kernel that I noticed my error. > > So, thank you to the kernelnewbies mailing list. > > Regards, > Tobin Harding > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > You are not supposed to send the Challenge to the list. It says that like 20 times when you sign up to the list :( -- So many immigrant groups have swept through our town that Brooklyn, like Atlantis, reaches mythological proportions in the mind of the world - RI Safir 1998 http://www.mrbrklyn.com DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002 http://www.nylxs.com - Leadership Development in Free Software http://www2.mrbrklyn.com/resources - Unpublished Archive http://www.coinhangout.com - coins! http://www.brooklyn-living.com Being so tracked is for FARM ANIMALS and and extermination camps, but incompatible with living as a free human being. -RI Safir 2013 From me at tobin.cc Tue Feb 9 01:07:24 2016 From: me at tobin.cc (me at tobin.cc) Date: Tue, 09 Feb 2016 17:07:24 +1100 Subject: mkinitcpio In-Reply-To: <56B97C7A.7020709@mrbrklyn.com> References: <20160207211242.GA14144@eros.fritz.box> <1454994803.601775.515857066.3E67DA9C@webmail.messagingengine.com> <1454994995.602321.515857554.3A93FDEA@webmail.messagingengine.com> <56B97C7A.7020709@mrbrklyn.com> Message-ID: <1454998044.611069.515883810.10C524BD@webmail.messagingengine.com> I'm sorry if I have offended you, I don't believe that my question or explanation had anything to do with the challenge. Excepting that the work eudyptula was in the email From ruben at mrbrklyn.com Tue Feb 9 01:20:13 2016 From: ruben at mrbrklyn.com (Ruben Safir) Date: Tue, 9 Feb 2016 01:20:13 -0500 Subject: mkinitcpio In-Reply-To: <1454998044.611069.515883810.10C524BD@webmail.messagingengine.com> References: <20160207211242.GA14144@eros.fritz.box> <1454994803.601775.515857066.3E67DA9C@webmail.messagingengine.com> <1454994995.602321.515857554.3A93FDEA@webmail.messagingengine.com> <56B97C7A.7020709@mrbrklyn.com> <1454998044.611069.515883810.10C524BD@webmail.messagingengine.com> Message-ID: <56B9851D.1090502@mrbrklyn.com> On 02/09/2016 01:07 AM, me at tobin.cc wrote: > > I'm sorry if I have offended you, I don't believe that my question or > explanation had anything to do with the challenge. Excepting that the > work eudyptula was in the email > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > you were asked if this is from the challenge and you said yes. Are you trolling us or did I miss understand something? -- So many immigrant groups have swept through our town that Brooklyn, like Atlantis, reaches mythological proportions in the mind of the world - RI Safir 1998 http://www.mrbrklyn.com DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002 http://www.nylxs.com - Leadership Development in Free Software http://www2.mrbrklyn.com/resources - Unpublished Archive http://www.coinhangout.com - coins! http://www.brooklyn-living.com Being so tracked is for FARM ANIMALS and and extermination camps, but incompatible with living as a free human being. -RI Safir 2013 From me at tobin.cc Tue Feb 9 01:27:24 2016 From: me at tobin.cc (me at tobin.cc) Date: Tue, 09 Feb 2016 17:27:24 +1100 Subject: mkinitcpio In-Reply-To: <56B9851D.1090502@mrbrklyn.com> References: <20160207211242.GA14144@eros.fritz.box> <1454994803.601775.515857066.3E67DA9C@webmail.messagingengine.com> <1454994995.602321.515857554.3A93FDEA@webmail.messagingengine.com> <56B97C7A.7020709@mrbrklyn.com> <1454998044.611069.515883810.10C524BD@webmail.messagingengine.com> <56B9851D.1090502@mrbrklyn.com> Message-ID: <1454999244.614347.515891818.2FC4E80E@webmail.messagingengine.com> > you were asked if this is from the challenge and you said yes. Are you > trolling us or did I miss understand something? I'm very sorry, I in no way meant to troll. I am just honestly trying to learn kernel development. I have two books and the afore mention challenges as my guides. I am sorry, I miss-understood you, yes I did answer that question. I will refrain from mentioning the challenges or asking any questions I face while doing them in future. Please accept my apologies, this was not the introduction to the kernel community that I had hoped for. Tobin Harding. From sudipm.mukherjee at gmail.com Tue Feb 9 02:04:02 2016 From: sudipm.mukherjee at gmail.com (Sudip Mukherjee) Date: Tue, 9 Feb 2016 12:34:02 +0530 Subject: mkinitcpio In-Reply-To: <1454999244.614347.515891818.2FC4E80E@webmail.messagingengine.com> References: <20160207211242.GA14144@eros.fritz.box> <1454994803.601775.515857066.3E67DA9C@webmail.messagingengine.com> <1454994995.602321.515857554.3A93FDEA@webmail.messagingengine.com> <56B97C7A.7020709@mrbrklyn.com> <1454998044.611069.515883810.10C524BD@webmail.messagingengine.com> <56B9851D.1090502@mrbrklyn.com> <1454999244.614347.515891818.2FC4E80E@webmail.messagingengine.com> Message-ID: On Tue, Feb 9, 2016 at 11:57 AM, wrote: > > > >> you were asked if this is from the challenge and you said yes. Are you >> trolling us or did I miss understand something? > > I'm very sorry, I in no way meant to troll. I am just honestly trying to > learn kernel development. I have two books and the afore mention > challenges as my guides. I am sorry, I miss-understood you, yes I did > answer that question. I will refrain from mentioning the challenges or > asking any questions I face while doing them in future. little has his way of knowing if some one has asked a question regading the challenge, and usually if some one asks then he is removed from the challenge. > > Please accept my apologies, this was not the introduction to the kernel > community that I had hoped for. You are always welcome in the community, but the challenge rules says "This challenge is for you, not anyone else, so don't ask about how to solve them on mailing lists or IRC." Regards Sudip From me at tobin.cc Tue Feb 9 02:36:15 2016 From: me at tobin.cc (me at tobin.cc) Date: Tue, 09 Feb 2016 18:36:15 +1100 Subject: mkinitcpio In-Reply-To: References: <20160207211242.GA14144@eros.fritz.box> <1454994803.601775.515857066.3E67DA9C@webmail.messagingengine.com> <1454994995.602321.515857554.3A93FDEA@webmail.messagingengine.com> <56B97C7A.7020709@mrbrklyn.com> <1454998044.611069.515883810.10C524BD@webmail.messagingengine.com> <56B9851D.1090502@mrbrklyn.com> <1454999244.614347.515891818.2FC4E80E@webmail.messagingengine.com> Message-ID: <1455003375.625719.515920490.0424B253@webmail.messagingengine.com> > little has his way of knowing if some one has asked a question regarding > the challenge, and usually if some one asks then he is removed from the > challenge. I sincerely hope that does not happen, it would be a real kick in the teeth as far as my kernel education goes. > You are always welcome in the community, but the challenge rules says > "This challenge is for you, not anyone else, so don't ask about how to > solve > them on mailing lists or IRC." Point noted, thank you. Regards, Tobin Harding. From alexhoppus111 at gmail.com Tue Feb 9 13:12:23 2016 From: alexhoppus111 at gmail.com (alexhoppus) Date: Tue, 9 Feb 2016 21:12:23 +0300 Subject: Why there is no GPU swap support in linux based systems? Message-ID: <56BA2C07.3080409@gmail.com> (The things below are mainly related to arm mali systems) Hi. Actually i want to know - why there is no GPU Swap support in Linux based systems? It seems that the GPU works with graphical contexts in the same fashion as CPU handle things. I mean there are page faults, GPU have its own MMU, the memory used by GPU devices allocated via trivial page_alloc mechanism. You would say that performance is a reason, but there are some swap backends like zram: they use in-memory compression instead of disk swapping. Moreover, i think there would be a GPU data which could be swapped without significant drawbacks, because it accessed very rare. Thank you. From greg at kroah.com Tue Feb 9 14:33:40 2016 From: greg at kroah.com (Greg KH) Date: Tue, 9 Feb 2016 11:33:40 -0800 Subject: Why there is no GPU swap support in linux based systems? In-Reply-To: <56BA2C07.3080409@gmail.com> References: <56BA2C07.3080409@gmail.com> Message-ID: <20160209193340.GA1912@kroah.com> On Tue, Feb 09, 2016 at 09:12:23PM +0300, alexhoppus wrote: > (The things below are mainly related to arm mali systems) > > Hi. Actually i want to know - why there is no GPU Swap support in Linux > based systems? It seems that the GPU works with graphical contexts in > the same fashion as CPU handle things. I mean there are page faults, GPU > have its own MMU, the memory used by GPU devices allocated via trivial > page_alloc mechanism. You would say that performance is a reason, but > there are some swap backends like zram: they use in-memory compression > instead of disk swapping. Moreover, i think there would be a GPU data > which could be swapped without significant drawbacks, because it > accessed very rare. That's not how GPU devices work. But if you think you could help implement this, I'm sure the graphic developers are always welcome to working patches being sent to them for review. best of luck, greg k-h From ricardo.ribalda at gmail.com Wed Feb 10 04:05:33 2016 From: ricardo.ribalda at gmail.com (Ricardo Ribalda Delgado) Date: Wed, 10 Feb 2016 10:05:33 +0100 Subject: Backtrace of every the threads Message-ID: Hello I have been debugging a process that makes a syscall which never returned. The problem was the interaction between than process and other kernel threads, due to an error on the way the locks were designed (my bad). Luckily, the error is gone now :). but I was wondering if there is a way to show the backtrace of ALL the threads in the system, which could have been a wonderful tool to debug this issue. Things that I tried and NOT worked: 1) perf top: It is fast and easy if the tasks are in active loops, but if they are sleeping, waiting for an event, holding a lock.... they will not appear. 2) ftrace works, but there are MILLIONS of lines to navigate :S Unless there is a good way to navigate the data it is a "last resource" tool. 3) gdb vmlinux /proc/kcore; info threads I had big hopes on this... but only one thread was showed. Are the Linux awareness gdb extensions ready? 4) sysrq, print backtrace It only shows the active threads, not the "waiting" ones What I want? A magic command that shows the backtrace of ALL the threads (kernel and userland). Something like a ps with steroids. Does this exist? Where would be the best place to start developing something like this: perf people, unix-utils, systemd :S , alone in a dark basement? Thanks! -- Ricardo Ribalda From anupam.kapoor at gmail.com Wed Feb 10 04:20:16 2016 From: anupam.kapoor at gmail.com (Anupam Kapoor) Date: Wed, 10 Feb 2016 14:50:16 +0530 Subject: Backtrace of every the threads In-Reply-To: References: Message-ID: <87k2mcx6pb.fsf@fatcat.parallelwireless> >>>>> [2016-02-10T14:35:33+0530]: "Ricardo Ribalda Delgado" (ricardo-delgado): ,----[ ricardo-delgado ] | Luckily, the error is gone now :). but I was wondering if there is a | way to show the backtrace of ALL the threads in the system, which | could have been a wonderful tool to debug this issue. `---- from the gdb info page: In a multi-threaded program, gdb by default shows the backtrace only for the current thread. To display the backtrace for several or all of the threads, use the command thread apply (see thread apply). For example, if you type thread apply all backtrace, gdb will display the backtrace for all the threads; this is handy when you debug a core dump of a multi-threaded program. hope that's what you are looking for ? -- kind regards anupam From ricardo.ribalda at gmail.com Wed Feb 10 04:36:30 2016 From: ricardo.ribalda at gmail.com (Ricardo Ribalda Delgado) Date: Wed, 10 Feb 2016 10:36:30 +0100 Subject: Backtrace of every the threads In-Reply-To: <87k2mcx6pb.fsf@fatcat.parallelwireless> References: <87k2mcx6pb.fsf@fatcat.parallelwireless> Message-ID: Hi Anupam On Wed, Feb 10, 2016 at 10:20 AM, Anupam Kapoor wrote: > > > In a multi-threaded program, gdb by default shows the backtrace only for > the current thread. To display the backtrace for several or all of the > threads, use the command thread apply (see thread apply). For example, > if you type thread apply all backtrace, gdb will display the backtrace > for all the threads; this is handy when you debug a core dump of a > multi-threaded program. > > hope that's what you are looking for ? Unfortunately not :( But thanks for trying :) Core was generated by `BOOT_IMAGE=/boot/bzImage root=PARTUUID=35F607FE-605D-457B-AE13-5D1099C5F266 roo'. #0 0x0000000000000000 in irq_stack_union () (gdb) (gdb) (gdb) info threads Id Target Id Frame * 1 process 1 0x0000000000000000 in irq_stack_union () (gdb) thread apply all backtrace Thread 1 (process 1): #0 0x0000000000000000 in irq_stack_union () #1 0x0000000000000000 in ?? () (gdb) > > -- > > kind regards > anupam -- Ricardo Ribalda From anupam.kapoor at gmail.com Wed Feb 10 05:32:23 2016 From: anupam.kapoor at gmail.com (Anupam Kapoor) Date: Wed, 10 Feb 2016 16:02:23 +0530 Subject: Backtrace of every the threads In-Reply-To: References: <87k2mcx6pb.fsf@fatcat.parallelwireless> Message-ID: <87io1wx3d4.fsf@fatcat.parallelwireless> >>>>> [2016-02-10T15:06:30+0530]: "Ricardo Ribalda Delgado" (ricardo-delgado): ,----[ ricardo-delgado ] | Unfortunately not :( But thanks for trying :) `---- seems to work just fine on a trivial program here: < aside: hopefully, i will not be judged too harshly for c++ :) > ,---- | anupam at fatcat cpu-stuff % gdb obj/affine-thread-to-cpu | GNU gdb (GDB) 7.10.1 | Copyright (C) 2015 Free Software Foundation, Inc. | License GPLv3+: GNU GPL version 3 or later | This is free software: you are free to change and redistribute it. | There is NO WARRANTY, to the extent permitted by law. Type "show copying" | and "show warranty" for details. | This GDB was configured as "x86_64-unknown-linux-gnu". | Type "show configuration" for configuration details. | For bug reporting instructions, please see: | . | Find the GDB manual and other documentation resources online at: | . | For help, type "help". | Type "apropos word" to search for commands related to "word"... | Reading symbols from obj/affine-thread-to-cpu...done. | (gdb) core core.11717 | warning: core file may not match specified executable file. | [New LWP 11717] | [New LWP 11718] | [New LWP 11720] | [New LWP 11721] | [New LWP 11719] | warning: Could not load shared library symbols for linux-vdso.so.1. | Do you need "set solib-search-path" or "set sysroot"? | [Thread debugging using libthread_db enabled] | Using host libthread_db library "/usr/lib/libthread_db.so.1". | Core was generated by `./obj/affine-thread-to-cpu'. | Program terminated with signal SIGSEGV, Segmentation fault. | #0 0x00007f4a34f9170d in pthread_join () from /usr/lib/libpthread.so.0 | [Current thread is 1 (Thread 0x7f4a3536f740 (LWP 11717))] | (gdb) thread apply all | Please specify a command following the thread ID list | (gdb) thread apply all bt | | Thread 5 (Thread 0x7f4a33b4d700 (LWP 11719)): | #0 0x00007f4a34f9965d in nanosleep () from /usr/lib/libpthread.so.0 | #1 0x0000000000401534 in std::this_thread::sleep_for > (__rtime=...) at /usr/include/c++/5.3.0/thread:292 | #2 ::operator() (__closure=0x24d8de8) at affine-thread-to-cpu.cpp:27 | #3 std::_Bind_simple()>::_M_invoke<> (this=0x24d8de8) at /usr/include/c++/5.3.0/functional:1531 | #4 std::_Bind_simple()>::operator() (this=0x24d8de8) at /usr/include/c++/5.3.0/functional:1520 | #5 std::thread::_Impl()> >::_M_run(void) (this=0x24d8dd0) at /usr/include/c++/5.3.0/thread:115 | #6 0x00007f4a34cbff40 in std::(anonymous namespace)::execute_native_thread_routine (__p=) | at /build/gcc/src/gcc-5.3.0/libstdc++-v3/src/c++11/thread.cc:84 | #7 0x00007f4a34f904a4 in start_thread () from /usr/lib/libpthread.so.0 | #8 0x00007f4a3443813d in clone () from /usr/lib/libc.so.6 | | Thread 4 (Thread 0x7f4a32b4b700 (LWP 11721)): | #0 0x00007f4a34f9965d in nanosleep () from /usr/lib/libpthread.so.0 | #1 0x0000000000401534 in std::this_thread::sleep_for > (__rtime=...) at /usr/include/c++/5.3.0/thread:292 | #2 ::operator() (__closure=0x24d90c8) at affine-thread-to-cpu.cpp:27 | #3 std::_Bind_simple()>::_M_invoke<> (this=0x24d90c8) at /usr/include/c++/5.3.0/functional:1531 | #4 std::_Bind_simple()>::operator() (this=0x24d90c8) at /usr/include/c++/5.3.0/functional:1520 | #5 std::thread::_Impl()> >::_M_run(void) (this=0x24d90b0) at /usr/include/c++/5.3.0/thread:115 | #6 0x00007f4a34cbff40 in std::(anonymous namespace)::execute_native_thread_routine (__p=) | at /build/gcc/src/gcc-5.3.0/libstdc++-v3/src/c++11/thread.cc:84 | #7 0x00007f4a34f904a4 in start_thread () from /usr/lib/libpthread.so.0 | #8 0x00007f4a3443813d in clone () from /usr/lib/libc.so.6 | | Thread 3 (Thread 0x7f4a3334c700 (LWP 11720)): | #0 0x00007f4a34f9965d in nanosleep () from /usr/lib/libpthread.so.0 | #1 0x0000000000401534 in std::this_thread::sleep_for > (__rtime=...) at /usr/include/c++/5.3.0/thread:292 | #2 ::operator() (__closure=0x24d8f58) at affine-thread-to-cpu.cpp:27 | #3 std::_Bind_simple()>::_M_invoke<> (this=0x24d8f58) at /usr/include/c++/5.3.0/functional:1531 | #4 std::_Bind_simple()>::operator() (this=0x24d8f58) at /usr/include/c++/5.3.0/functional:1520 | #5 std::thread::_Impl()> >::_M_run(void) (this=0x24d8f40) at /usr/include/c++/5.3.0/thread:115 | #6 0x00007f4a34cbff40 in std::(anonymous namespace)::execute_native_thread_routine (__p=) | at /build/gcc/src/gcc-5.3.0/libstdc++-v3/src/c++11/thread.cc:84 | #7 0x00007f4a34f904a4 in start_thread () from /usr/lib/libpthread.so.0 | #8 0x00007f4a3443813d in clone () from /usr/lib/libc.so.6 | | Thread 2 (Thread 0x7f4a3434e700 (LWP 11718)): | #0 0x00007f4a34f9965d in nanosleep () from /usr/lib/libpthread.so.0 | #1 0x0000000000401534 in std::this_thread::sleep_for > (__rtime=...) at /usr/include/c++/5.3.0/thread:292 | #2 ::operator() (__closure=0x24d8c78) at affine-thread-to-cpu.cpp:27 | #3 std::_Bind_simple()>::_M_invoke<> (this=0x24d8c78) at /usr/include/c++/5.3.0/functional:1531 | #4 std::_Bind_simple()>::operator() (this=0x24d8c78) at /usr/include/c++/5.3.0/functional:1520 | #5 std::thread::_Impl()> >::_M_run(void) (this=0x24d8c60) at /usr/include/c++/5.3.0/thread:115 | #6 0x00007f4a34cbff40 in std::(anonymous namespace)::execute_native_thread_routine (__p=) | at /build/gcc/src/gcc-5.3.0/libstdc++-v3/src/c++11/thread.cc:84 | #7 0x00007f4a34f904a4 in start_thread () from /usr/lib/libpthread.so.0 | #8 0x00007f4a3443813d in clone () from /usr/lib/libc.so.6 | | Thread 1 (Thread 0x7f4a3536f740 (LWP 11717)): | #0 0x00007f4a34f9170d in pthread_join () from /usr/lib/libpthread.so.0 | #1 0x00007f4a34cbfe57 in __gthread_join (__value_ptr=0x0, __threadid=) | at /build/gcc/src/gcc-build/x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu/bits/gthr-default.h:668 | #2 std::thread::join (this=this at entry=0x24d8c20) at /build/gcc/src/gcc-5.3.0/libstdc++-v3/src/c++11/thread.cc:107 | #3 0x0000000000401248 in main (argc=, argv=) at affine-thread-to-cpu.cpp:45 | (gdb) | `---- -- kind regards anupam From ricardo.ribalda at gmail.com Wed Feb 10 05:56:40 2016 From: ricardo.ribalda at gmail.com (Ricardo Ribalda Delgado) Date: Wed, 10 Feb 2016 11:56:40 +0100 Subject: Backtrace of every the threads In-Reply-To: <87io1wx3d4.fsf@fatcat.parallelwireless> References: <87k2mcx6pb.fsf@fatcat.parallelwireless> <87io1wx3d4.fsf@fatcat.parallelwireless> Message-ID: I did not explain myself well. By thread I mean kernel thread, and user thread. What i want to get is a back trace of ALL the programs running in user and kernel space. Your example is a single program, and the trace ends in userspace. Sorry for the missunderstunding. On Wed, Feb 10, 2016 at 11:32 AM, Anupam Kapoor wrote: > >>>>>> [2016-02-10T15:06:30+0530]: "Ricardo Ribalda Delgado" (ricardo-delgado): > ,----[ ricardo-delgado ] > | Unfortunately not :( But thanks for trying :) > `---- > seems to work just fine on a trivial program here: > < aside: hopefully, i will not be judged too harshly for c++ :) > > > ,---- > | anupam at fatcat cpu-stuff % gdb obj/affine-thread-to-cpu > | GNU gdb (GDB) 7.10.1 > | Copyright (C) 2015 Free Software Foundation, Inc. > | License GPLv3+: GNU GPL version 3 or later > | This is free software: you are free to change and redistribute it. > | There is NO WARRANTY, to the extent permitted by law. Type "show copying" > | and "show warranty" for details. > | This GDB was configured as "x86_64-unknown-linux-gnu". > | Type "show configuration" for configuration details. > | For bug reporting instructions, please see: > | . > | Find the GDB manual and other documentation resources online at: > | . > | For help, type "help". > | Type "apropos word" to search for commands related to "word"... > | Reading symbols from obj/affine-thread-to-cpu...done. > | (gdb) core core.11717 > | warning: core file may not match specified executable file. > | [New LWP 11717] > | [New LWP 11718] > | [New LWP 11720] > | [New LWP 11721] > | [New LWP 11719] > | warning: Could not load shared library symbols for linux-vdso.so.1. > | Do you need "set solib-search-path" or "set sysroot"? > | [Thread debugging using libthread_db enabled] > | Using host libthread_db library "/usr/lib/libthread_db.so.1". > | Core was generated by `./obj/affine-thread-to-cpu'. > | Program terminated with signal SIGSEGV, Segmentation fault. > | #0 0x00007f4a34f9170d in pthread_join () from /usr/lib/libpthread.so.0 > | [Current thread is 1 (Thread 0x7f4a3536f740 (LWP 11717))] > | (gdb) thread apply all > | Please specify a command following the thread ID list > | (gdb) thread apply all bt > | > | Thread 5 (Thread 0x7f4a33b4d700 (LWP 11719)): > | #0 0x00007f4a34f9965d in nanosleep () from /usr/lib/libpthread.so.0 > | #1 0x0000000000401534 in std::this_thread::sleep_for > (__rtime=...) at /usr/include/c++/5.3.0/thread:292 > | #2 ::operator() (__closure=0x24d8de8) at affine-thread-to-cpu.cpp:27 > | #3 std::_Bind_simple()>::_M_invoke<> (this=0x24d8de8) at /usr/include/c++/5.3.0/functional:1531 > | #4 std::_Bind_simple()>::operator() (this=0x24d8de8) at /usr/include/c++/5.3.0/functional:1520 > | #5 std::thread::_Impl()> >::_M_run(void) (this=0x24d8dd0) at /usr/include/c++/5.3.0/thread:115 > | #6 0x00007f4a34cbff40 in std::(anonymous namespace)::execute_native_thread_routine (__p=) > | at /build/gcc/src/gcc-5.3.0/libstdc++-v3/src/c++11/thread.cc:84 > | #7 0x00007f4a34f904a4 in start_thread () from /usr/lib/libpthread.so.0 > | #8 0x00007f4a3443813d in clone () from /usr/lib/libc.so.6 > | > | Thread 4 (Thread 0x7f4a32b4b700 (LWP 11721)): > | #0 0x00007f4a34f9965d in nanosleep () from /usr/lib/libpthread.so.0 > | #1 0x0000000000401534 in std::this_thread::sleep_for > (__rtime=...) at /usr/include/c++/5.3.0/thread:292 > | #2 ::operator() (__closure=0x24d90c8) at affine-thread-to-cpu.cpp:27 > | #3 std::_Bind_simple()>::_M_invoke<> (this=0x24d90c8) at /usr/include/c++/5.3.0/functional:1531 > | #4 std::_Bind_simple()>::operator() (this=0x24d90c8) at /usr/include/c++/5.3.0/functional:1520 > | #5 std::thread::_Impl()> >::_M_run(void) (this=0x24d90b0) at /usr/include/c++/5.3.0/thread:115 > | #6 0x00007f4a34cbff40 in std::(anonymous namespace)::execute_native_thread_routine (__p=) > | at /build/gcc/src/gcc-5.3.0/libstdc++-v3/src/c++11/thread.cc:84 > | #7 0x00007f4a34f904a4 in start_thread () from /usr/lib/libpthread.so.0 > | #8 0x00007f4a3443813d in clone () from /usr/lib/libc.so.6 > | > | Thread 3 (Thread 0x7f4a3334c700 (LWP 11720)): > | #0 0x00007f4a34f9965d in nanosleep () from /usr/lib/libpthread.so.0 > | #1 0x0000000000401534 in std::this_thread::sleep_for > (__rtime=...) at /usr/include/c++/5.3.0/thread:292 > | #2 ::operator() (__closure=0x24d8f58) at affine-thread-to-cpu.cpp:27 > | #3 std::_Bind_simple()>::_M_invoke<> (this=0x24d8f58) at /usr/include/c++/5.3.0/functional:1531 > | #4 std::_Bind_simple()>::operator() (this=0x24d8f58) at /usr/include/c++/5.3.0/functional:1520 > | #5 std::thread::_Impl()> >::_M_run(void) (this=0x24d8f40) at /usr/include/c++/5.3.0/thread:115 > | #6 0x00007f4a34cbff40 in std::(anonymous namespace)::execute_native_thread_routine (__p=) > | at /build/gcc/src/gcc-5.3.0/libstdc++-v3/src/c++11/thread.cc:84 > | #7 0x00007f4a34f904a4 in start_thread () from /usr/lib/libpthread.so.0 > | #8 0x00007f4a3443813d in clone () from /usr/lib/libc.so.6 > | > | Thread 2 (Thread 0x7f4a3434e700 (LWP 11718)): > | #0 0x00007f4a34f9965d in nanosleep () from /usr/lib/libpthread.so.0 > | #1 0x0000000000401534 in std::this_thread::sleep_for > (__rtime=...) at /usr/include/c++/5.3.0/thread:292 > | #2 ::operator() (__closure=0x24d8c78) at affine-thread-to-cpu.cpp:27 > | #3 std::_Bind_simple()>::_M_invoke<> (this=0x24d8c78) at /usr/include/c++/5.3.0/functional:1531 > | #4 std::_Bind_simple()>::operator() (this=0x24d8c78) at /usr/include/c++/5.3.0/functional:1520 > | #5 std::thread::_Impl()> >::_M_run(void) (this=0x24d8c60) at /usr/include/c++/5.3.0/thread:115 > | #6 0x00007f4a34cbff40 in std::(anonymous namespace)::execute_native_thread_routine (__p=) > | at /build/gcc/src/gcc-5.3.0/libstdc++-v3/src/c++11/thread.cc:84 > | #7 0x00007f4a34f904a4 in start_thread () from /usr/lib/libpthread.so.0 > | #8 0x00007f4a3443813d in clone () from /usr/lib/libc.so.6 > | > | Thread 1 (Thread 0x7f4a3536f740 (LWP 11717)): > | #0 0x00007f4a34f9170d in pthread_join () from /usr/lib/libpthread.so.0 > | #1 0x00007f4a34cbfe57 in __gthread_join (__value_ptr=0x0, __threadid=) > | at /build/gcc/src/gcc-build/x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu/bits/gthr-default.h:668 > | #2 std::thread::join (this=this at entry=0x24d8c20) at /build/gcc/src/gcc-5.3.0/libstdc++-v3/src/c++11/thread.cc:107 > | #3 0x0000000000401248 in main (argc=, argv=) at affine-thread-to-cpu.cpp:45 > | (gdb) > | > `---- > > -- > > kind regards > anupam -- Ricardo Ribalda From anupam.kapoor at gmail.com Wed Feb 10 05:59:57 2016 From: anupam.kapoor at gmail.com (Anupam Kapoor) Date: Wed, 10 Feb 2016 16:29:57 +0530 Subject: Backtrace of every the threads In-Reply-To: References: <87k2mcx6pb.fsf@fatcat.parallelwireless> <87io1wx3d4.fsf@fatcat.parallelwireless> Message-ID: <87h9hgx236.fsf@fatcat.parallelwireless> >>>>> [2016-02-10T16:26:40+0530]: "Ricardo Ribalda Delgado" (ricardo-delgado): ,----[ ricardo-delgado ] | By thread I mean kernel thread, and user thread. | | What i want to get is a back trace of ALL the programs running in user | and kernel space. `---- d.u.d.e :) -- kind regards anupam From Valdis.Kletnieks at vt.edu Wed Feb 10 08:37:06 2016 From: Valdis.Kletnieks at vt.edu (Valdis.Kletnieks at vt.edu) Date: Wed, 10 Feb 2016 08:37:06 -0500 Subject: Backtrace of every the threads In-Reply-To: References: <87k2mcx6pb.fsf@fatcat.parallelwireless> <87io1wx3d4.fsf@fatcat.parallelwireless> Message-ID: <55546.1455111426@turing-police.cc.vt.edu> On Wed, 10 Feb 2016 11:56:40 +0100, Ricardo Ribalda Delgado said: > I did not explain myself well. > > By thread I mean kernel thread, and user thread. > > What i want to get is a back trace of ALL the programs running in user > and kernel space. See what happens when you do 'echo t > /proc/sysrq-trigger'. Note that you probably *don't* actually want a trace of *all* tasks (hint - what happens on a large system that has 2,000 cores on it)? What problem are you trying to solve by getting a trace of everything? (Hint - what meaning does a userspace stack traceback have if you're looking at the corresponding kernel stack trace?) -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 848 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160210/5b0ee9ef/attachment.bin From victordetoni at gmail.com Wed Feb 10 08:40:44 2016 From: victordetoni at gmail.com (Victor Detoni) Date: Wed, 10 Feb 2016 11:40:44 -0200 Subject: Question about memory in C Message-ID: Hi all, I'm working for a network security prototype and I would like to know the best way to read diferent configs from the memory, for example: My program will receive many pkts from network interface and it needs to know what's profile it will use based on source ip address. First all, I'm thinking to use array in C, for example: for (i=0;i<=PROFILES;i++) { if (pkt.ip_addr == source_ip[i]) do_something(pkt,i) } I will process at about millions entries per second and ~100 profiles. What do you think? It will work fine? fast? any suggest? thanks Victor -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160210/6b978809/attachment.html From skmprabhu2 at gmail.com Wed Feb 10 08:54:12 2016 From: skmprabhu2 at gmail.com (Skm Prabhu) Date: Wed, 10 Feb 2016 19:24:12 +0530 Subject: Question about memory in C In-Reply-To: References: Message-ID: I think reading file sequentially & process it is a good idea for huge chunk of data. Just think about sort the data in someway (i feel, index sort or hashing would be great) & use some search mechanism. Again it is all depends on sort & search algorithm. On Wed, Feb 10, 2016 at 7:10 PM, Victor Detoni wrote: > Hi all, > > I'm working for a network security prototype and I would like to know the > best way to read diferent configs from the memory, for example: > > My program will receive many pkts from network interface and it needs to > know what's profile it will use based on source ip address. > > First all, I'm thinking to use array in C, for example: > > for (i=0;i<=PROFILES;i++) { > if (pkt.ip_addr == source_ip[i]) > do_something(pkt,i) > } > > I will process at about millions entries per second and ~100 profiles. > What do you think? It will work fine? fast? any suggest? > > thanks > Victor > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160210/6feb6984/attachment.html From alexhoppus111 at gmail.com Wed Feb 10 13:37:23 2016 From: alexhoppus111 at gmail.com (alexhoppus) Date: Wed, 10 Feb 2016 21:37:23 +0300 Subject: Why there is no GPU swap support in linux based systems? In-Reply-To: <20160209193340.GA1912@kroah.com> References: <56BA2C07.3080409@gmail.com> <20160209193340.GA1912@kroah.com> Message-ID: <56BB8363.1000009@gmail.com> On 09.02.2016 22:33, Greg KH wrote: > On Tue, Feb 09, 2016 at 09:12:23PM +0300, alexhoppus wrote: >> (The things below are mainly related to arm mali systems) >> >> Hi. Actually i want to know - why there is no GPU Swap support in Linux >> based systems? It seems that the GPU works with graphical contexts in >> the same fashion as CPU handle things. I mean there are page faults, GPU >> have its own MMU, the memory used by GPU devices allocated via trivial >> page_alloc mechanism. You would say that performance is a reason, but >> there are some swap backends like zram: they use in-memory compression >> instead of disk swapping. Moreover, i think there would be a GPU data >> which could be swapped without significant drawbacks, because it >> accessed very rare. > That's not how GPU devices work. But if you think you could help > implement this, I'm sure the graphic developers are always welcome to > working patches being sent to them for review. > > best of luck, > > greg k-h > Could you (anyone), please, explain what exactly is wrong with this? I'am not talking about discrete video cards. As i understand, in this case video memory is a subset of pages from main memory. Also i will highlight that i'am talking about swapping out some GPU related data f.e. textures, for tasks which are not active at the moment (background graphical contexts). As i see both CPU and GPU can handle page faults for graphical memory pages and we can establish apropriate CPU and GPU mappings for this pages. So what is the problem with this then? Thanks for response. From maitysanchayan at gmail.com Wed Feb 10 14:14:35 2016 From: maitysanchayan at gmail.com (maitysanchayan at gmail.com) Date: Thu, 11 Feb 2016 00:44:35 +0530 Subject: SPI Slave Patch - Kernel Version In-Reply-To: References: Message-ID: <20160210191434.GA21297@Sanchayan-Arch> Hi, On 16-02-02 06:46:33, Asharaf P wrote: > Hai, > > I was looking for SPI slave support and found some patches at linux-spi mailing list[1]. > > I am using custom branch[2] from freescale based on 3.14, on which the above patch failed, so how can i find the base version of the above patch set, also can anyone help me to find the status of the patchset, because i didn't find it merged on any tree. I guess this is the sixth version of the patchset https://lkml.org/lkml/2015/12/8/47 and there was of course a third http://thread.gmane.org/gmane.linux.kernel.spi.devel/22130/focus=22237 AFAICT a seventh version has not been posted yet and so not merged. Since this is a recent patchset from 2015 this is probably based on one of the latest 4.x series kernel. Mostly you will have to backport. Regards, Sanchayan. > > [1] : http://marc.info/?l=linux-arm-kernel&m=144320405317902&w=2 > [2] : http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/log/?h=imx_3.14.38_6qp_ga > > Regards > Asharaf P > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies From cakturk at gmail.com Wed Feb 10 16:25:53 2016 From: cakturk at gmail.com (Cihangir Akturk) Date: Wed, 10 Feb 2016 23:25:53 +0200 Subject: Question about memory in C In-Reply-To: References: Message-ID: <20160210212553.GA8415@portege> On Wed, Feb 10, 2016 at 11:40:44AM -0200, Victor Detoni wrote: > Hi all, > > I'm working for a network security prototype and I would like to know the > best way to read diferent configs from the memory, for example: > > My program will receive many pkts from network interface and it needs to > know what's profile it will use based on source ip address. > > First all, I'm thinking to use array in C, for example: > > for (i=0;i<=PROFILES;i++) { > if (pkt.ip_addr == source_ip[i]) > do_something(pkt,i) > } > > I will process at about millions entries per second and ~100 profiles. What > do you think? It will work fine? fast? any suggest? > > thanks > Victor Hi Victor, I would consider using a simple hash table. Use ipaddr as a key to do fast lookup of the value. Take a look at scripts/fixdep.c which includes a FNV hash table implementation. From victordetoni at gmail.com Wed Feb 10 17:49:30 2016 From: victordetoni at gmail.com (Victor Detoni) Date: Wed, 10 Feb 2016 20:49:30 -0200 Subject: Question about memory in C In-Reply-To: <20160210212553.GA8415@portege> References: <20160210212553.GA8415@portege> Message-ID: Hi, Thank you for your tip! I really appreciate it. In my situation I will have many profiles and for each profile I can have many ip address, for example: profile 1: 192.168.0.0/24 192.168.1.2/32 192.168.14/23 ... profile 2: 10.10.10.0/24 10.11.12.0/23 ... What's your opinion? I'm thinking to use pcap library, but I still haven't the key. On Wed, Feb 10, 2016 at 7:25 PM, Cihangir Akturk wrote: > On Wed, Feb 10, 2016 at 11:40:44AM -0200, Victor Detoni wrote: > > Hi all, > > > > I'm working for a network security prototype and I would like to know the > > best way to read diferent configs from the memory, for example: > > > > My program will receive many pkts from network interface and it needs to > > know what's profile it will use based on source ip address. > > > > First all, I'm thinking to use array in C, for example: > > > > for (i=0;i<=PROFILES;i++) { > > if (pkt.ip_addr == source_ip[i]) > > do_something(pkt,i) > > } > > > > I will process at about millions entries per second and ~100 profiles. > What > > do you think? It will work fine? fast? any suggest? > > > > thanks > > Victor > > Hi Victor, > > I would consider using a simple hash table. Use ipaddr as a key to > do fast lookup of the value. Take a look at scripts/fixdep.c which > includes a FNV hash table implementation. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160210/38501f25/attachment.html From greg at kroah.com Wed Feb 10 18:19:38 2016 From: greg at kroah.com (Greg KH) Date: Wed, 10 Feb 2016 15:19:38 -0800 Subject: Question about memory in C In-Reply-To: References: <20160210212553.GA8415@portege> Message-ID: <20160210231938.GA22076@kroah.com> On Wed, Feb 10, 2016 at 08:49:30PM -0200, Victor Detoni wrote: > Hi, > > Thank you for your tip! I really appreciate it. In my situation I will have > many profiles and for each profile I can have many ip address, for example: > > profile 1: > 192.168.0.0/24 > 192.168.1.2/32 > 192.168.14/23 > ... > > profile 2: > 10.10.10.0/24 > 10.11.12.0/23 > ... > > What's your opinion? I'm thinking to use pcap library, but I still haven't the > key. I think you have a long way to go before you need to worry about stuff like this. Why not test and see exactly _where_ the performance problems are before trying to solve things you don't know are actually problems yet. good luck, greg k-h From ricardo.ribalda at gmail.com Thu Feb 11 08:56:32 2016 From: ricardo.ribalda at gmail.com (Ricardo Ribalda Delgado) Date: Thu, 11 Feb 2016 14:56:32 +0100 Subject: Backtrace of every the threads In-Reply-To: <55546.1455111426@turing-police.cc.vt.edu> References: <87k2mcx6pb.fsf@fatcat.parallelwireless> <87io1wx3d4.fsf@fatcat.parallelwireless> <55546.1455111426@turing-police.cc.vt.edu> Message-ID: Hi Valdis On Wed, Feb 10, 2016 at 2:37 PM, wrote: > > See what happens when you do 'echo t > /proc/sysrq-trigger'. This is exactly what I was needing :) I owe you a beer. > > Note that you probably *don't* actually want a trace of *all* tasks (hint - > what happens on a large system that has 2,000 cores on it)? This is a embedded system with "only" 70 process. I agree that on another system this is not the way to debug it. > > What problem are you trying to solve by getting a trace of everything? (Hint - > what meaning does a userspace stack traceback have if you're looking at > the corresponding kernel stack trace?) I was doing: cat /dev/video0 And the open() syscall sometimes was stalling. I wanted to know at what place open() syscall was waiting... The error was due to a wrong locking methodology (in my code) Thanks again! -- Ricardo Ribalda From Valdis.Kletnieks at vt.edu Thu Feb 11 13:05:32 2016 From: Valdis.Kletnieks at vt.edu (Valdis.Kletnieks at vt.edu) Date: Thu, 11 Feb 2016 13:05:32 -0500 Subject: Backtrace of every the threads In-Reply-To: References: <87k2mcx6pb.fsf@fatcat.parallelwireless> <87io1wx3d4.fsf@fatcat.parallelwireless> <55546.1455111426@turing-police.cc.vt.edu> Message-ID: <90602.1455213932@turing-police.cc.vt.edu> On Thu, 11 Feb 2016 14:56:32 +0100, Ricardo Ribalda Delgado said: > > What problem are you trying to solve by getting a trace of everything? (Hint - > > what meaning does a userspace stack traceback have if you're looking at > > the corresponding kernel stack trace?) > > I was doing: > > cat /dev/video0 > > And the open() syscall sometimes was stalling. > > I wanted to know at what place open() syscall was waiting... You can find *that* out by doing a 'cat /proc/NNNN/stack' for NNNN == process id. No need to find *all* the stack traces for that. :) -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 848 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160211/9247d273/attachment.bin From varyani.nitin1 at gmail.com Sat Feb 13 01:12:57 2016 From: varyani.nitin1 at gmail.com (Nitin Varyani) Date: Sat, 13 Feb 2016 11:42:57 +0530 Subject: Process scheduling Message-ID: Hello, I want to understand the flow of code of process scheduler of linux kernel. What I have understood is that The task marks itself as sleeping, puts itself on a wait queue, removes itself from the red-black tree of runnable, and calls schedule() to select a new process to execute. for Waking back up The task is set as runnable, removed from the wait queue, and added back to the red-black tree. Can I get the details of which function does what? in sched/core.c and in sched/fair.c I am concerned only with fair scheduler. There are so many functions in these two files that I am totally confused. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160213/6f9cccab/attachment.html From henrik at austad.us Sat Feb 13 03:49:04 2016 From: henrik at austad.us (Henrik Austad) Date: Sat, 13 Feb 2016 09:49:04 +0100 Subject: Process scheduling In-Reply-To: References: Message-ID: <20160213084904.GB21526@icarus.home.austad.us> On Sat, Feb 13, 2016 at 11:42:57AM +0530, Nitin Varyani wrote: > Hello, Hi Nitin, > I want to understand the flow of code of process scheduler of > linux kernel. What I have understood is that > The task marks itself as sleeping, > puts itself on a wait queue, > removes itself from the red-black tree of runnable, and > calls schedule() to select a new process to execute. > > for Waking back up > The task is set as runnable, > removed from the wait queue, > and added back to the red-black tree. > > Can I get the details of which function does what? in sched/core.c and in > sched/fair.c > I am concerned only with fair scheduler. There are so many functions in > these two files that I am totally confused. Then core.c and fair.c is the best bet. You could also pick up a copy of Linux kernel development (By Love), it gives a nice introduction to the overall flow of .. well mostly everything. :) In kernel/sched/sched.h you have a struct called 'struct sched_class" which is a set of function-points. This is used by the core machinery to call into scheduling-class specific code. At the bottom of fair.c, you see said struct being populated. Also, if you want to see what really happens, try enabling function-tracing, but limit it to sched-functions only (and sched-events, those are also useful to see what triggers things) mount -t debugfs nodev /sys/kernel/debug cd /sys/kernel/debug/tracing echo 0 > tracing_on echo function > current_tracer echo "sched*" > set_ftrace_filter echo 1 > events/sched/enable echo 1 > tracing_on ... wait for a few secs echo 0 > tracing_on cat trace > /tmp/trace.txt Now, look at trace.txt and correlate it to the scheduler code :) Good luck! -- Henrik Austad -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 181 bytes Desc: Digital signature Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160213/5c031fa3/attachment.bin From varyani.nitin1 at gmail.com Sat Feb 13 04:42:35 2016 From: varyani.nitin1 at gmail.com (Nitin Varyani) Date: Sat, 13 Feb 2016 15:12:35 +0530 Subject: Process scheduling In-Reply-To: <20160213084904.GB21526@icarus.home.austad.us> References: <20160213084904.GB21526@icarus.home.austad.us> Message-ID: thanks On Sat, Feb 13, 2016 at 2:19 PM, Henrik Austad wrote: > On Sat, Feb 13, 2016 at 11:42:57AM +0530, Nitin Varyani wrote: > > Hello, > > Hi Nitin, > > > I want to understand the flow of code of process scheduler of > > linux kernel. What I have understood is that > > The task marks itself as sleeping, > > puts itself on a wait queue, > > removes itself from the red-black tree of runnable, and > > calls schedule() to select a new process to execute. > > > > for Waking back up > > The task is set as runnable, > > removed from the wait queue, > > and added back to the red-black tree. > > > > Can I get the details of which function does what? in sched/core.c and in > > sched/fair.c > > I am concerned only with fair scheduler. There are so many functions in > > these two files that I am totally confused. > > Then core.c and fair.c is the best bet. > > You could also pick up a copy of Linux kernel development (By Love), it > gives a nice introduction to the overall flow of .. well mostly everything. > :) > > In kernel/sched/sched.h you have a struct called 'struct sched_class" which > is a set of function-points. This is used by the core machinery to call > into scheduling-class specific code. At the bottom of fair.c, you see said > struct being populated. > > Also, if you want to see what really happens, try enabling > function-tracing, but limit it to sched-functions only (and sched-events, > those are also useful to see what triggers things) > > mount -t debugfs nodev /sys/kernel/debug > cd /sys/kernel/debug/tracing > echo 0 > tracing_on > echo function > current_tracer > echo "sched*" > set_ftrace_filter > echo 1 > events/sched/enable > echo 1 > tracing_on > ... wait for a few secs > echo 0 > tracing_on > > cat trace > /tmp/trace.txt > > Now, look at trace.txt and correlate it to the scheduler code :) > > Good luck! > > -- > Henrik Austad > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160213/93eb460d/attachment.html From tobaccopipeyoyo at gmail.com Sat Feb 13 21:16:50 2016 From: tobaccopipeyoyo at gmail.com (tobaccopipeyoyo .) Date: Sat, 13 Feb 2016 18:16:50 -0800 Subject: current during interrupt servicing Message-ID: Hi, I'm new to kernel programming, currently started ldd book For the current process it says that global item current returns the task_struct of the currently running process. What if I refer this global during interrupt servicing? What will happen? What should I expect. Thanks, tpyy From pratyushpatel.1995 at gmail.com Sun Feb 14 00:30:40 2016 From: pratyushpatel.1995 at gmail.com (Pratyush Patel) Date: Sun, 14 Feb 2016 11:00:40 +0530 Subject: Locking while executing bottom-halves and process context code Message-ID: Hello, While reading a section in Linux Kernel Development, I came across the following: "If process context code and a bottom half share data, you need to disable bottom-half processing and obtain a lock before accessing the data." Why is this the case? Can one not disable/lock the process context code instead of the bottom-half and access data? Similarly, for the statement, "If interrupt context code and a bottom half share data, you need to disable interrupts and obtain a lock before accessing the data." Any help in clarifying this would be much appreciated. Thanks, Pratyush From henrik at austad.us Sun Feb 14 05:10:14 2016 From: henrik at austad.us (Henrik Austad) Date: Sun, 14 Feb 2016 11:10:14 +0100 Subject: Locking while executing bottom-halves and process context code In-Reply-To: References: Message-ID: <20160214101014.GC21526@icarus.home.austad.us> On Sun, Feb 14, 2016 at 11:00:40AM +0530, Pratyush Patel wrote: > Hello, > > While reading a section in Linux Kernel Development, I came across the > following: > > "If process context code and a bottom half share data, you need to > disable bottom-half processing and obtain a lock before accessing the > data." > > Why is this the case? Can one not disable/lock the process context > code instead of the bottom-half and access data? You need to do it in both. You need to grab the lock in BH in case other threads also calls the same syscall. You need to lock in from user process context to avoid being interrupted and having a BH walk in and update the data. A Thread | do_something() do_a_syscall() // update a var in kernel, but on behalf of thread read shared var A * Interrupt * irq_entry // ack interrupt, do critical stuff // trigger softirq do the rest irq_exit softirq_entry Update shared var A softirq_exit (now back in thread A, inside kernel) write old value of A back // updated A from softirq now lost! > Similarly, for the statement, > > "If interrupt context code and a bottom half share data, you need to > disable interrupts and obtain a lock before accessing the data." > > Any help in clarifying this would be much appreciated. Same as for userprocess vs. BH, an ISR can interrupt a BH and update data unless you have disabled interrupt. HTH, -- Henrik Austad -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 181 bytes Desc: Digital signature Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160214/2d6d2c1d/attachment.bin From pratyushpatel.1995 at gmail.com Sun Feb 14 05:28:20 2016 From: pratyushpatel.1995 at gmail.com (Pratyush Patel) Date: Sun, 14 Feb 2016 15:58:20 +0530 Subject: Locking while executing bottom-halves and process context code In-Reply-To: <20160214101014.GC21526@icarus.home.austad.us> References: <20160214101014.GC21526@icarus.home.austad.us> Message-ID: On Sun, Feb 14, 2016 at 3:40 PM, Henrik Austad wrote: > On Sun, Feb 14, 2016 at 11:00:40AM +0530, Pratyush Patel wrote: >> Hello, >> >> While reading a section in Linux Kernel Development, I came across the >> following: >> >> "If process context code and a bottom half share data, you need to >> disable bottom-half processing and obtain a lock before accessing the >> data." >> >> Why is this the case? Can one not disable/lock the process context >> code instead of the bottom-half and access data? > > You need to do it in both. That makes a lot more sense. > You need to grab the lock in BH in case other threads also calls the same > syscall. You need to lock in from user process context to avoid being > interrupted and having a BH walk in and update the data. > > A Thread > | > do_something() > do_a_syscall() > // update a var in kernel, but on behalf of thread > read shared var A > * Interrupt * > irq_entry > // ack interrupt, do critical stuff > // trigger softirq do the rest > irq_exit > softirq_entry > Update shared var A > softirq_exit > > (now back in thread A, inside kernel) > write old value of A back // updated A from softirq now lost! > Wonderful explanation, thank you. > >> Similarly, for the statement, >> >> "If interrupt context code and a bottom half share data, you need to >> disable interrupts and obtain a lock before accessing the data." >> >> Any help in clarifying this would be much appreciated. > > Same as for userprocess vs. BH, an ISR can interrupt a BH and update data > unless you have disabled interrupt. -Pratyush From mulyadi.santosa at gmail.com Sun Feb 14 13:10:53 2016 From: mulyadi.santosa at gmail.com (Mulyadi Santosa) Date: Mon, 15 Feb 2016 01:10:53 +0700 Subject: current during interrupt servicing In-Reply-To: References: Message-ID: On Sun, Feb 14, 2016 at 9:16 AM, tobaccopipeyoyo . < tobaccopipeyoyo at gmail.com> wrote: > Hi, > I'm new to kernel programming, currently started ldd book > For the current process it says that global item current returns the > task_struct of the currently running process. > > What if I refer this global during interrupt servicing? > What will happen? What should I expect. > > Thanks, > tpyy > > Hi... during interrupt servicing, "current" will give you last process' data structure that's get interrupted by the interrupt. Of course, this is per cpu context, so if you are in SMP situation, current will return task struct in that CPU only. The essential thing in interrupt servicing is: interrupt handler runs on behalf of current running process. Hopefully I still recall all these correctly. -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160215/005f337f/attachment.html From yuzibode at 126.com Sun Feb 14 18:46:36 2016 From: yuzibode at 126.com (YU Bo) Date: Mon, 15 Feb 2016 07:46:36 +0800 (CST) Subject: Merge conflict Message-ID: <50a639e9.361.152e22dc5ea.Coremail.yuzibode@126.com> Hi, Some days ago i followed the tips: http://kernelnewbies.org/FirstKernelPatch git clone greg's git tree and built branch first-patch. Due to my first patch that fixes coding style reported by checkptch.pl didn't applied,so i intend to rebase my git branch first-patch.The question i encounter is: ==================git command && output======== yubo at debian:~/maintree/staging$ git rebase first-patch It looks like git-am is in progress. Cannot rebase. yubo at debian:~/maintree/staging$ git am --abort You seem to have moved HEAD since the last 'am' failure. Not rewinding to ORIG_HEAD yubo at debian:~/maintree/staging$ git rebase first-patch First, rewinding head to replay your work on top of it... Applying: ovl: default permissions Using index info to reconstruct a base tree... Falling back to patching base and 3-way merge... ---- Auto-merging drivers/gpu/drm/i915/intel_display.c CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/intel_display.c Failed to merge in the changes. Patch failed at 0010 drm/i915: Only run commit when crtc is active, v2. Is there something with wrong? Thanks in advance for the noisy. -- Best Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160215/a9f6b611/attachment.html From newell.roger at gmail.com Sun Feb 14 18:51:40 2016 From: newell.roger at gmail.com (Roger H Newell) Date: Sun, 14 Feb 2016 20:21:40 -0330 Subject: Merge conflict In-Reply-To: <50a639e9.361.152e22dc5ea.Coremail.yuzibode@126.com> References: <50a639e9.361.152e22dc5ea.Coremail.yuzibode@126.com> Message-ID: I think you want to have first-patch checked out and rebase origin/staging-testing ? You mite also consider checking out staging-testing first and run git fetch origin. On Feb 14, 2016 8:17 PM, "YU Bo" wrote: > > Hi, > Some days ago i followed the tips: > http://kernelnewbies.org/FirstKernelPatch > git clone greg's git tree and built branch first-patch. > Due to my first patch that fixes coding style reported > by checkptch.pl didn't applied,so i intend to rebase my > git branch first-patch.The question i encounter is: > ==================git command && output======== > yubo at debian:~/maintree/staging$ git rebase first-patch > It looks like git-am is in progress. Cannot rebase. > yubo at debian:~/maintree/staging$ git am --abort > You seem to have moved HEAD since the last 'am' failure. > Not rewinding to ORIG_HEAD > yubo at debian:~/maintree/staging$ git rebase first-patch > First, rewinding head to replay your work on top of it... > Applying: ovl: default permissions > Using index info to reconstruct a base tree... > Falling back to patching base and 3-way merge... > ---- > Auto-merging drivers/gpu/drm/i915/intel_display.c > CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/intel_display.c > Failed to merge in the changes. > Patch failed at 0010 drm/i915: Only run commit when crtc is active, v2. > > Is there something with wrong? > Thanks in advance for the noisy. > -- > Best Regards > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160214/dd794278/attachment.html From yuzibode at 126.com Sun Feb 14 19:10:35 2016 From: yuzibode at 126.com (YU Bo) Date: Mon, 15 Feb 2016 08:10:35 +0800 (CST) Subject: Merge conflict In-Reply-To: References: <50a639e9.361.152e22dc5ea.Coremail.yuzibode@126.com> Message-ID: <35d0bb5e.45d.152e243ba6a.Coremail.yuzibode@126.com> Hi, I just have checkouted origin/staging-testing and git rebase first-patch.Now, =============git command && output============== yubo at debian:~/maintree/staging$ git branch -a * (no branch) first-patch staging-next staging-testing remotes/origin/HEAD -> origin/master remotes/origin/master remotes/origin/staging-linus remotes/origin/staging-next remotes/origin/staging-testing remotes/origin/test ubo at debian:~/maintree/staging$ git fetch origin remote: Counting objects: 273, done. remote: Compressing objects: 100% (273/273), done. remote: Total 273 (delta 160), reused 0 (delta 0) Receiving objects: 100% (273/273), 298.64 KiB | 196 KiB/s, done. Resolving deltas: 100% (160/160), done. From git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging 2cdb82c..d9750a2 staging-next -> origin/staging-next yubo at debian:~/maintree/staging$ git checkout staging-testing drivers/gpu/drm/i915/intel_display.c: needs merge error: you need to resolve your current index first ===============end================== -- Best Regards ? 2016-02-15 07:51:40?"Roger H Newell" ??? I think you want to have first-patch checked out and rebase origin/staging-testing ? You mite also consider checking out staging-testing first and run git fetch origin. On Feb 14, 2016 8:17 PM, "YU Bo" wrote: > > Hi, > Some days ago i followed the tips: > http://kernelnewbies.org/FirstKernelPatch > git clone greg's git tree and built branch first-patch. > Due to my first patch that fixes coding style reported > by checkptch.pl didn't applied,so i intend to rebase my > git branch first-patch.The question i encounter is: > ==================git command && output======== > yubo at debian:~/maintree/staging$ git rebase first-patch > It looks like git-am is in progress. Cannot rebase. > yubo at debian:~/maintree/staging$ git am --abort > You seem to have moved HEAD since the last 'am' failure. > Not rewinding to ORIG_HEAD > yubo at debian:~/maintree/staging$ git rebase first-patch > First, rewinding head to replay your work on top of it... > Applying: ovl: default permissions > Using index info to reconstruct a base tree... > Falling back to patching base and 3-way merge... > ---- > Auto-merging drivers/gpu/drm/i915/intel_display.c > CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/intel_display.c > Failed to merge in the changes. > Patch failed at 0010 drm/i915: Only run commit when crtc is active, v2. > > Is there something with wrong? > Thanks in advance for the noisy. > -- > Best Regards > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160215/5c0d9abc/attachment-0001.html From yuzibode at 126.com Sun Feb 14 19:15:41 2016 From: yuzibode at 126.com (YU Bo) Date: Mon, 15 Feb 2016 08:15:41 +0800 (CST) Subject: Merge conflict In-Reply-To: <35d0bb5e.45d.152e243ba6a.Coremail.yuzibode@126.com> References: <50a639e9.361.152e22dc5ea.Coremail.yuzibode@126.com> <35d0bb5e.45d.152e243ba6a.Coremail.yuzibode@126.com> Message-ID: <57bd53d7.4b9.152e248655d.Coremail.yuzibode@126.com> Sorry for hasty to send previous email. Maybe i have to delete the branch first-patch.But i still will figure out the problem in git way. Thank you, -- Best Regards ? 2016-02-15 08:10:35?"YU Bo" ??? Hi, I just have checkouted origin/staging-testing and git rebase first-patch.Now, =============git command && output============== yubo at debian:~/maintree/staging$ git branch -a * (no branch) first-patch staging-next staging-testing remotes/origin/HEAD -> origin/master remotes/origin/master remotes/origin/staging-linus remotes/origin/staging-next remotes/origin/staging-testing remotes/origin/test ubo at debian:~/maintree/staging$ git fetch origin remote: Counting objects: 273, done. remote: Compressing objects: 100% (273/273), done. remote: Total 273 (delta 160), reused 0 (delta 0) Receiving objects: 100% (273/273), 298.64 KiB | 196 KiB/s, done. Resolving deltas: 100% (160/160), done. From git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging 2cdb82c..d9750a2 staging-next -> origin/staging-next yubo at debian:~/maintree/staging$ git checkout staging-testing drivers/gpu/drm/i915/intel_display.c: needs merge error: you need to resolve your current index first ===============end================== -- Best Regards ? 2016-02-15 07:51:40?"Roger H Newell" ??? I think you want to have first-patch checked out and rebase origin/staging-testing ? You mite also consider checking out staging-testing first and run git fetch origin. On Feb 14, 2016 8:17 PM, "YU Bo" wrote: > > Hi, > Some days ago i followed the tips: > http://kernelnewbies.org/FirstKernelPatch > git clone greg's git tree and built branch first-patch. > Due to my first patch that fixes coding style reported > by checkptch.pl didn't applied,so i intend to rebase my > git branch first-patch.The question i encounter is: > ==================git command && output======== > yubo at debian:~/maintree/staging$ git rebase first-patch > It looks like git-am is in progress. Cannot rebase. > yubo at debian:~/maintree/staging$ git am --abort > You seem to have moved HEAD since the last 'am' failure. > Not rewinding to ORIG_HEAD > yubo at debian:~/maintree/staging$ git rebase first-patch > First, rewinding head to replay your work on top of it... > Applying: ovl: default permissions > Using index info to reconstruct a base tree... > Falling back to patching base and 3-way merge... > ---- > Auto-merging drivers/gpu/drm/i915/intel_display.c > CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/intel_display.c > Failed to merge in the changes. > Patch failed at 0010 drm/i915: Only run commit when crtc is active, v2. > > Is there something with wrong? > Thanks in advance for the noisy. > -- > Best Regards > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160215/52151de4/attachment.html From vishu.kernel at gmail.com Sun Feb 14 22:47:32 2016 From: vishu.kernel at gmail.com (Vishwas Srivastava) Date: Mon, 15 Feb 2016 09:17:32 +0530 Subject: Kernelnewbies Digest, Vol 63, Issue 20 Message-ID: ---------- Forwarded message ---------- From: Date: Mon, Feb 15, 2016 at 5:40 AM Subject: Kernelnewbies Digest, Vol 63, Issue 20 To: kernelnewbies 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: current during interrupt servicing (Mulyadi Santosa) 2. Merge conflict (YU Bo) 3. Re: Merge conflict (Roger H Newell) 4. Re:Re: Merge conflict (YU Bo) ---------------------------------------------------------------------- Message: 1 Date: Mon, 15 Feb 2016 01:10:53 +0700 From: Mulyadi Santosa Subject: Re: current during interrupt servicing To: "tobaccopipeyoyo ." Cc: kernelnewbies Message-ID: Content-Type: text/plain; charset="utf-8" On Sun, Feb 14, 2016 at 9:16 AM, tobaccopipeyoyo . < tobaccopipeyoyo at gmail.com> wrote: > Hi, > I'm new to kernel programming, currently started ldd book > For the current process it says that global item current returns the > task_struct of the currently running process. > > What if I refer this global during interrupt servicing? > What will happen? What should I expect. > > Thanks, > tpyy > > Hi... during interrupt servicing, "current" will give you last process' data structure that's get interrupted by the interrupt. Of course, this is per cpu context, so if you are in SMP situation, current will return task struct in that CPU only. The essential thing in interrupt servicing is: interrupt handler runs on behalf of current running process. Hopefully I still recall all these correctly. -- regards, Mulyadi Santosa Freelance Linux trainer and consultant Hi Mulyadi, I disagree with the statement you made here that "interrupt handler runs on behalf of current running process". Your statement is valid for system calls (software interrupt) but not for the real "interrupt" Interrupt handler are nowhere related to any process. They run their own without caring about which process was running. --- Vishwas blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160215/005f337f/attachment-0001.html ------------------------------ Message: 2 Date: Mon, 15 Feb 2016 07:46:36 +0800 (CST) From: "YU Bo" Subject: Merge conflict To: "kernelnewbies at kernelnewbies.org" Message-ID: <50a639e9.361.152e22dc5ea.Coremail.yuzibode at 126.com> Content-Type: text/plain; charset="gbk" Hi, Some days ago i followed the tips: http://kernelnewbies.org/FirstKernelPatch git clone greg's git tree and built branch first-patch. Due to my first patch that fixes coding style reported by checkptch.pl didn't applied,so i intend to rebase my git branch first-patch.The question i encounter is: ==================git command && output======== yubo at debian:~/maintree/staging$ git rebase first-patch It looks like git-am is in progress. Cannot rebase. yubo at debian:~/maintree/staging$ git am --abort You seem to have moved HEAD since the last 'am' failure. Not rewinding to ORIG_HEAD yubo at debian:~/maintree/staging$ git rebase first-patch First, rewinding head to replay your work on top of it... Applying: ovl: default permissions Using index info to reconstruct a base tree... Falling back to patching base and 3-way merge... ---- Auto-merging drivers/gpu/drm/i915/intel_display.c CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/intel_display.c Failed to merge in the changes. Patch failed at 0010 drm/i915: Only run commit when crtc is active, v2. Is there something with wrong? Thanks in advance for the noisy. -- Best Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160215/a9f6b611/attachment-0001.html ------------------------------ Message: 3 Date: Sun, 14 Feb 2016 20:21:40 -0330 From: Roger H Newell Subject: Re: Merge conflict To: YU Bo Cc: kernelnewbies at kernelnewbies.org Message-ID: Content-Type: text/plain; charset="utf-8" I think you want to have first-patch checked out and rebase origin/staging-testing ? You mite also consider checking out staging-testing first and run git fetch origin. On Feb 14, 2016 8:17 PM, "YU Bo" wrote: > > Hi, > Some days ago i followed the tips: > http://kernelnewbies.org/FirstKernelPatch > git clone greg's git tree and built branch first-patch. > Due to my first patch that fixes coding style reported > by checkptch.pl didn't applied,so i intend to rebase my > git branch first-patch.The question i encounter is: > ==================git command && output======== > yubo at debian:~/maintree/staging$ git rebase first-patch > It looks like git-am is in progress. Cannot rebase. > yubo at debian:~/maintree/staging$ git am --abort > You seem to have moved HEAD since the last 'am' failure. > Not rewinding to ORIG_HEAD > yubo at debian:~/maintree/staging$ git rebase first-patch > First, rewinding head to replay your work on top of it... > Applying: ovl: default permissions > Using index info to reconstruct a base tree... > Falling back to patching base and 3-way merge... > ---- > Auto-merging drivers/gpu/drm/i915/intel_display.c > CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/intel_display.c > Failed to merge in the changes. > Patch failed at 0010 drm/i915: Only run commit when crtc is active, v2. > > Is there something with wrong? > Thanks in advance for the noisy. > -- > Best Regards > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160214/dd794278/attachment-0001.html ------------------------------ Message: 4 Date: Mon, 15 Feb 2016 08:10:35 +0800 (CST) From: "YU Bo" Subject: Re:Re: Merge conflict To: "Roger H Newell" Cc: kernelnewbies at kernelnewbies.org Message-ID: <35d0bb5e.45d.152e243ba6a.Coremail.yuzibode at 126.com> Content-Type: text/plain; charset="gbk" Hi, I just have checkouted origin/staging-testing and git rebase first-patch.Now, =============git command && output============== yubo at debian:~/maintree/staging$ git branch -a * (no branch) first-patch staging-next staging-testing remotes/origin/HEAD -> origin/master remotes/origin/master remotes/origin/staging-linus remotes/origin/staging-next remotes/origin/staging-testing remotes/origin/test ubo at debian:~/maintree/staging$ git fetch origin remote: Counting objects: 273, done. remote: Compressing objects: 100% (273/273), done. remote: Total 273 (delta 160), reused 0 (delta 0) Receiving objects: 100% (273/273), 298.64 KiB | 196 KiB/s, done. Resolving deltas: 100% (160/160), done. >From git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging 2cdb82c..d9750a2 staging-next -> origin/staging-next yubo at debian:~/maintree/staging$ git checkout staging-testing drivers/gpu/drm/i915/intel_display.c: needs merge error: you need to resolve your current index first ===============end================== -- Best Regards ? 2016-02-15 07:51:40?"Roger H Newell" ??? I think you want to have first-patch checked out and rebase origin/staging-testing ? You mite also consider checking out staging-testing first and run git fetch origin. On Feb 14, 2016 8:17 PM, "YU Bo" wrote: > > Hi, > Some days ago i followed the tips: > http://kernelnewbies.org/FirstKernelPatch > git clone greg's git tree and built branch first-patch. > Due to my first patch that fixes coding style reported > by checkptch.pl didn't applied,so i intend to rebase my > git branch first-patch.The question i encounter is: > ==================git command && output======== > yubo at debian:~/maintree/staging$ git rebase first-patch > It looks like git-am is in progress. Cannot rebase. > yubo at debian:~/maintree/staging$ git am --abort > You seem to have moved HEAD since the last 'am' failure. > Not rewinding to ORIG_HEAD > yubo at debian:~/maintree/staging$ git rebase first-patch > First, rewinding head to replay your work on top of it... > Applying: ovl: default permissions > Using index info to reconstruct a base tree... > Falling back to patching base and 3-way merge... > ---- > Auto-merging drivers/gpu/drm/i915/intel_display.c > CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/intel_display.c > Failed to merge in the changes. > Patch failed at 0010 drm/i915: Only run commit when crtc is active, v2. > > Is there something with wrong? > Thanks in advance for the noisy. > -- > Best Regards > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160215/5c0d9abc/attachment.html ------------------------------ _______________________________________________ Kernelnewbies mailing list Kernelnewbies at kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies End of Kernelnewbies Digest, Vol 63, Issue 20 ********************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160215/8465d9cd/attachment-0001.html From klshiva4a4 at gmail.com Mon Feb 15 01:47:23 2016 From: klshiva4a4 at gmail.com (Shiva Shankar) Date: Mon, 15 Feb 2016 12:17:23 +0530 Subject: counting semaphore question Message-ID: Hi all, Can you anyone tell me what is the exact use of counting semaphore in kernel ? When should we use it ? what is the practical usage of counting semaphores in Linux kernel ? I have seen only mutex (Binary semaphore)is used for synchronization not the counting semaphore(count >1). Any sugguestions would be appreciated Thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160215/bf46bf71/attachment.html From ckim at etri.re.kr Mon Feb 15 03:56:37 2016 From: ckim at etri.re.kr (Chan Kim) Date: Mon, 15 Feb 2016 08:56:37 +0000 Subject: counting semaphore question In-Reply-To: References: Message-ID: <1A0A429E720CFD4A9673A435389F1636550B0E4C@SMTP4.etri.info> Hi, I'm not a proper person to reply to this question but at least I know what it is for. see below (from http://www.makelinux.net/books/lkd2/ch09lev1sec4) Alternatively, the count can be initialized to a nonzero value greater than one. In this case, the semaphore is called a counting semaphore, and it allows at most count holders of the lock at a time. Counting semaphores are not used to enforce mutual exclusion because they allow multiple threads of execution in the critical region at once. Instead, they are used to enforce limits in certain code. They are not used much in the kernel. If you use a semaphore, you almost assuredly want to use a mutex (a semaphore with a count of one). I don't know in what circumstances the number of resource holders should be limitted. Maybe for a subsystem handling synchronization itself but the number of users should be limited? Hope to hear from somebody with good examples. regards, Chan ?? ?? : "Shiva Shankar" ?? ?? : 2016-02-15 15:47:57 ( +09:00 ) ?? ?? : kernelnewbies ?? : ?? : counting semaphore question Hi all, Can you anyone tell me what is the exact use of counting semaphore in kernel ? When should we use it ? what is the practical usage of counting semaphores in Linux kernel ? I have seen only mutex (Binary semaphore)is used for synchronization not the counting semaphore(count >1). Any sugguestions would be appreciated Thanks in advance. From ebru.akagunduz at gmail.com Mon Feb 15 03:57:46 2016 From: ebru.akagunduz at gmail.com (=?UTF-8?B?RWJydSBBa2Fnw7xuZMO8eg==?=) Date: Mon, 15 Feb 2016 10:57:46 +0200 Subject: Merge conflict In-Reply-To: <57bd53d7.4b9.152e248655d.Coremail.yuzibode@126.com> References: <50a639e9.361.152e22dc5ea.Coremail.yuzibode@126.com> <35d0bb5e.45d.152e243ba6a.Coremail.yuzibode@126.com> <57bd53d7.4b9.152e248655d.Coremail.yuzibode@126.com> Message-ID: Hello, >> Hi, >> Some days ago i followed the tips: >> http://kernelnewbies.org/FirstKernelPatch >> git clone greg's git tree and built branch first-patch. >> Due to my first patch that fixes coding style reported >> by checkptch.pl didn't applied,so i intend to rebase my >> git branch first-patch.The question i encounter is: >> ==================git command && output======== >> yubo at debian:~/maintree/staging$ git rebase first-patch >> It looks like git-am is in progress. Cannot rebase. >> yubo at debian:~/maintree/staging$ git am --abort >> You seem to have moved HEAD since the last 'am' failure. >> Not rewinding to ORIG_HEAD >> yubo at debian:~/maintree/staging$ git rebase first-patch >> First, rewinding head to replay your work on top of it... >> Applying: ovl: default permissions >> Using index info to reconstruct a base tree... >> Falling back to patching base and 3-way merge... >> ---- >> Auto-merging drivers/gpu/drm/i915/intel_display.c >> CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/intel_display.c >> Failed to merge in the changes. >> Patch failed at 0010 drm/i915: Only run commit when crtc is active, v2. >> >> Is there something with wrong? >> Thanks in advance for the noisy. If you would like to update your patch with newest version of the tree, I recommend to you, use git am. Here is the blog post: http://www.pizzhacks.com/bugdrome/2011/10/deal-with-git-am-failures/ After updating your current tree; Firstly, you should give the command: 1- git am your_old_patch After seeing, it could not be applied, give this: 2- git apply PATCH --reject You'll see rejected and applied chunks, the rejected parts will be specified with extension .rej (with related file name). You should edit related files manually. 3- git add fixed_files 4- git am --resolved All done :). This way seems easier to me. The blog post explained steps, quite clear as well. Kind regards, Ebru -- Ebru Akagunduz http://www.ebruakagunduz.com From mulyadi.santosa at gmail.com Mon Feb 15 03:53:40 2016 From: mulyadi.santosa at gmail.com (Mulyadi Santosa) Date: Mon, 15 Feb 2016 15:53:40 +0700 Subject: Kernelnewbies Digest, Vol 63, Issue 20 In-Reply-To: References: Message-ID: On Mon, Feb 15, 2016 at 10:47 AM, Vishwas Srivastava wrote: > > On Sun, Feb 14, 2016 at 9:16 AM, tobaccopipeyoyo . < > tobaccopipeyoyo at gmail.com> wrote: > > > Hi, > > I'm new to kernel programming, currently started ldd book > > For the current process it says that global item current returns the > > task_struct of the currently running process. > > > > What if I refer this global during interrupt servicing? > > What will happen? What should I expect. > > > > Thanks, > > tpyy > > > > > Hi... > > during interrupt servicing, "current" will give you last process' data > structure that's get interrupted by the interrupt. Of course, this is per > cpu context, so if you are in SMP situation, current will return task > struct in that CPU only. > > The essential thing in interrupt servicing is: interrupt handler runs on > behalf of current running process. > > Hopefully I still recall all these correctly. > > > -- > regards, > > Mulyadi Santosa > Freelance Linux trainer and consultant > > Hi Mulyadi, > I disagree with the statement you made here that > "interrupt handler runs on behalf of current running process". > Your statement is valid for system calls (software interrupt) but not for > the real "interrupt" > Interrupt handler are nowhere related to any process. They run their own > without caring about > which process was running. > --- Vishwas > > > Hello Vishwas Thank you for your correction. You're correct. Maybe my wording is not exactly correct. My intention was to point that especially during bottom half interrupt servicing, if you run call "current", it will point to last process before kernel switch to kernel mode servicing the interrupt. So the word "on behalf" is not exactly correct, I admit that. Feel free to correct if I am still wrong... -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160215/7a8a814e/attachment.html From varyani.nitin1 at gmail.com Mon Feb 15 07:37:22 2016 From: varyani.nitin1 at gmail.com (Nitin Varyani) Date: Mon, 15 Feb 2016 18:07:22 +0530 Subject: Process scheduling In-Reply-To: References: <20160213084904.GB21526@icarus.home.austad.us> Message-ID: On Mon, Feb 15, 2016 at 6:06 PM, Nitin Varyani wrote: > Hi > I have studied LInux kernel CFS scheduling algorithm - the > vruntime, weights, nice value, etc. I am able to understand the code. > Actually the task given to me is really very huge. I am told to design a > distributed process scheduling algorithm. A very simple implementation of > it will be sufficient for me. Current distributed OS are patch work over > the linux kernels, that is, they are responsible for load balancing through > process migration but the scheduling is taken care by the single machine > linux kernels. My task is to make the scheduling algorithm itself as > distributed. That is a scheduler makes a decision whether to migrate a task > or to keep the task in the current system. I need some design aspects of > how to achieve it. Another thing which I want to know is that whether this > job is possible for a kernel newbie like me. > > On Sat, Feb 13, 2016 at 3:12 PM, Nitin Varyani > wrote: > >> thanks >> >> On Sat, Feb 13, 2016 at 2:19 PM, Henrik Austad wrote: >> >>> On Sat, Feb 13, 2016 at 11:42:57AM +0530, Nitin Varyani wrote: >>> > Hello, >>> >>> Hi Nitin, >>> >>> > I want to understand the flow of code of process scheduler of >>> > linux kernel. What I have understood is that >>> > The task marks itself as sleeping, >>> > puts itself on a wait queue, >>> > removes itself from the red-black tree of runnable, and >>> > calls schedule() to select a new process to execute. >>> > >>> > for Waking back up >>> > The task is set as runnable, >>> > removed from the wait queue, >>> > and added back to the red-black tree. >>> > >>> > Can I get the details of which function does what? in sched/core.c and >>> in >>> > sched/fair.c >>> > I am concerned only with fair scheduler. There are so many functions in >>> > these two files that I am totally confused. >>> >>> Then core.c and fair.c is the best bet. >>> >>> You could also pick up a copy of Linux kernel development (By Love), it >>> gives a nice introduction to the overall flow of .. well mostly >>> everything. >>> :) >>> >>> In kernel/sched/sched.h you have a struct called 'struct sched_class" >>> which >>> is a set of function-points. This is used by the core machinery to call >>> into scheduling-class specific code. At the bottom of fair.c, you see >>> said >>> struct being populated. >>> >>> Also, if you want to see what really happens, try enabling >>> function-tracing, but limit it to sched-functions only (and sched-events, >>> those are also useful to see what triggers things) >>> >>> mount -t debugfs nodev /sys/kernel/debug >>> cd /sys/kernel/debug/tracing >>> echo 0 > tracing_on >>> echo function > current_tracer >>> echo "sched*" > set_ftrace_filter >>> echo 1 > events/sched/enable >>> echo 1 > tracing_on >>> ... wait for a few secs >>> echo 0 > tracing_on >>> >>> cat trace > /tmp/trace.txt >>> >>> Now, look at trace.txt and correlate it to the scheduler code :) >>> >>> Good luck! >>> >>> -- >>> Henrik Austad >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160215/d8031e45/attachment-0001.html From yuzibode at 126.com Mon Feb 15 09:16:48 2016 From: yuzibode at 126.com (YU Bo) Date: Mon, 15 Feb 2016 22:16:48 +0800 (CST) Subject: Merge conflict In-Reply-To: References: <50a639e9.361.152e22dc5ea.Coremail.yuzibode@126.com> <35d0bb5e.45d.152e243ba6a.Coremail.yuzibode@126.com> <57bd53d7.4b9.152e248655d.Coremail.yuzibode@126.com> Message-ID: <253e29fa.3c04.152e54a762a.Coremail.yuzibode@126.com> Hello, At 2016-02-15 16:57:46, "Ebru Akag?nd?z" wrote: >Hello, > >>> Hi, >>> Some days ago i followed the tips: >>> http://kernelnewbies.org/FirstKernelPatch >>> git clone greg's git tree and built branch first-patch. >>> Due to my first patch that fixes coding style reported >>> by checkptch.pl didn't applied,so i intend to rebase my >>> git branch first-patch.The question i encounter is: >>> ==================git command && output======== >>> yubo at debian:~/maintree/staging$ git rebase first-patch >>> It looks like git-am is in progress. Cannot rebase. >>> yubo at debian:~/maintree/staging$ git am --abort >>> You seem to have moved HEAD since the last 'am' failure. >>> Not rewinding to ORIG_HEAD >>> yubo at debian:~/maintree/staging$ git rebase first-patch >>> First, rewinding head to replay your work on top of it... >>> Applying: ovl: default permissions >>> Using index info to reconstruct a base tree... >>> Falling back to patching base and 3-way merge... >>> ---- >>> Auto-merging drivers/gpu/drm/i915/intel_display.c >>> CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/intel_display.c >>> Failed to merge in the changes. >>> Patch failed at 0010 drm/i915: Only run commit when crtc is active, v2. >>> >>> Is there something with wrong? >>> Thanks in advance for the noisy. > >If you would like to update your patch with newest version of the tree, >I recommend to you, use git am. Here is the blog post: >http://www.pizzhacks.com/bugdrome/2011/10/deal-with-git-am-failures/ > >After updating your current tree; > >Firstly, you should give the command: >1- git am your_old_patch > >After seeing, it could not be applied, give this: >2- git apply PATCH --reject > >You'll see rejected and applied chunks, the rejected parts will be specified >with extension .rej (with related file name). You should edit related >files manually. > >3- git add fixed_files >4- git am --resolved > > >All done :). This way seems easier to me. The blog post explained >steps, quite clear as well. > Thanks. I will learn more about git. >Kind regards, >Ebru > >-- >Ebru Akagunduz >http://www.ebruakagunduz.com > >_______________________________________________ >Kernelnewbies mailing list >Kernelnewbies at kernelnewbies.org >http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160215/2a824b4c/attachment.html From rgroner at RTD.com Mon Feb 15 09:44:27 2016 From: rgroner at RTD.com (Rob Groner) Date: Mon, 15 Feb 2016 14:44:27 +0000 Subject: Finding when a chip was supported in the kernel Message-ID: Is there some specific place/way I can find the specific kernel version when support for an arbitrary chip was added? An example is the Intel 82574 Ethernet chip. I'm finding that google is failing me for finding the specific kernel of inclusion. This comes up somewhat often here at work (having to determine how far back our Linux support goes), so I'm trying to find the best way to determine this. Thank you. Rob Groner -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160215/78e78341/attachment.html From carlo at caione.org Mon Feb 15 10:06:14 2016 From: carlo at caione.org (Carlo Caione) Date: Mon, 15 Feb 2016 16:06:14 +0100 Subject: Finding when a chip was supported in the kernel In-Reply-To: References: Message-ID: On Mon, Feb 15, 2016 at 3:44 PM, Rob Groner wrote: > > > Is there some specific place/way I can find the specific kernel version when > support for an arbitrary chip was added? An example is the Intel 82574 > Ethernet chip. I?m finding that google is failing me for finding the > specific kernel of inclusion. This comes up somewhat often here at work > (having to determine how far back our Linux support goes), so I?m trying to > find the best way to determine this. git log --reverse $driver git describe --contains $SHA -- Carlo Caione From bjorn at mork.no Mon Feb 15 10:43:30 2016 From: bjorn at mork.no (=?utf-8?Q?Bj=C3=B8rn_Mork?=) Date: Mon, 15 Feb 2016 16:43:30 +0100 Subject: Finding when a chip was supported in the kernel In-Reply-To: (Carlo Caione's message of "Mon, 15 Feb 2016 16:06:14 +0100") References: Message-ID: <87fuwuvv19.fsf@nemi.mork.no> Carlo Caione writes: > On Mon, Feb 15, 2016 at 3:44 PM, Rob Groner wrote: >> >> >> Is there some specific place/way I can find the specific kernel version when >> support for an arbitrary chip was added? An example is the Intel 82574 >> Ethernet chip. I?m finding that google is failing me for finding the >> specific kernel of inclusion. This comes up somewhat often here at work >> (having to determine how far back our Linux support goes), so I?m trying to >> find the best way to determine this. > > git log --reverse $driver I often find it easier to use git blame for such stuff, looking at the dates of code related to the chip/feature in question. At least in cases like this where a single driver supports a number of different chips. You'll have to verify the results with "git show" of course, in case everything was refactored. The 82574 is a good example (since the authors made it easy with that comment): 1st attempt returns a code refactoring commit: bjorn at nemi:/usr/local/src/git/linux$ git log --reverse drivers/net/ethernet/intel/e1000e/82571.c commit dee1ad47f2ee75f5146d83ca757c1b7861c34c3b Author: Jeff Kirsher Date: Thu Apr 7 07:42:33 2011 -0700 intel: Move the Intel wired LAN drivers Moves the Intel wired LAN drivers into drivers/net/ethernet/intel/ and the necessary Kconfig and Makefile changes. Signed-off-by: Jeff Kirsher 2nd attempt returns the commit adding the driver, but that specific chip wasn't supported (a fact which might not be easy to sport using this method): bjorn at nemi:/usr/local/src/git/linux$ git log --reverse dee1ad47f2ee^ -- drivers/net/e1000e/82571.c commit bc7f75fa97884d41efbfde1397b621fefb2550b4 Author: Auke Kok Date: Mon Sep 17 12:30:59 2007 -0700 [E1000E]: New pci-express e1000 driver (currently for ICH9 devices only) This driver implements support for the ICH9 on-board LAN ethernet device. The device is similar to ICH8. The driver encompasses code to support 82571/2/3, es2lan and ICH8 devices as well, but those device IDs are disabled and will be "lifted" from the e1000 driver over one at a time once this driver receives some more live time. So you still don't know when the 82574 support was added.... git blame on the other hand, gives you this immediately: bjorn at nemi:/usr/local/src/git/linux$ git blame drivers/net/ethernet/intel/e1000e/82571.c e78b80b1079e1 drivers/net/ethernet/intel/e1000e/82571.c (David Ertman 2014-02-04 01:56:06 +0000 1) /* Intel PRO/1000 Linux driver [..] bc7f75fa97884 drivers/net/e1000e/82571.c (Auke Kok 2007-09-17 12:30:59 -0700 21) e921eb1ac411a drivers/net/ethernet/intel/e1000e/82571.c (Bruce Allan 2012-11-28 09:28:37 +0000 22) /* 82571EB Gigabit Ethernet Controller 1605927fcee41 drivers/net/e1000e/82571.c (Bruce Allan 2008-11-21 16:51:06 -0800 23) * 82571EB Gigabit Ethernet Controller (Copper) bc7f75fa97884 drivers/net/e1000e/82571.c (Auke Kok 2007-09-17 12:30:59 -0700 24) * 82571EB Gigabit Ethernet Controller (Fiber) ad68076e07fa0 drivers/net/e1000e/82571.c (Bruce Allan 2008-03-28 09:15:03 -0700 25) * 82571EB Dual Port Gigabit Mezzanine Adapter ad68076e07fa0 drivers/net/e1000e/82571.c (Bruce Allan 2008-03-28 09:15:03 -0700 26) * 82571EB Quad Port Gigabit Mezzanine Adapter ad68076e07fa0 drivers/net/e1000e/82571.c (Bruce Allan 2008-03-28 09:15:03 -0700 27) * 82571PT Gigabit PT Quad Port Server ExpressMo bc7f75fa97884 drivers/net/e1000e/82571.c (Auke Kok 2007-09-17 12:30:59 -0700 28) * 82572EI Gigabit Ethernet Controller (Copper) bc7f75fa97884 drivers/net/e1000e/82571.c (Auke Kok 2007-09-17 12:30:59 -0700 29) * 82572EI Gigabit Ethernet Controller (Fiber) bc7f75fa97884 drivers/net/e1000e/82571.c (Auke Kok 2007-09-17 12:30:59 -0700 30) * 82572EI Gigabit Ethernet Controller bc7f75fa97884 drivers/net/e1000e/82571.c (Auke Kok 2007-09-17 12:30:59 -0700 31) * 82573V Gigabit Ethernet Controller (Copper) bc7f75fa97884 drivers/net/e1000e/82571.c (Auke Kok 2007-09-17 12:30:59 -0700 32) * 82573E Gigabit Ethernet Controller (Copper) bc7f75fa97884 drivers/net/e1000e/82571.c (Auke Kok 2007-09-17 12:30:59 -0700 33) * 82573L Gigabit Ethernet Controller 4662e82b2cb41 drivers/net/e1000e/82571.c (Bruce Allan 2008-08-26 18:37:06 -0700 34) * 82574L Gigabit Network Connection 8c81c9c315b7e drivers/net/e1000e/82571.c (Alexander Duyck 2009-03-19 01:12:27 +0000 35) * 82583V Gigabit Network Connection bc7f75fa97884 drivers/net/e1000e/82571.c (Auke Kok 2007-09-17 12:30:59 -0700 36) */ bc7f75fa97884 drivers/net/e1000e/82571.c (Auke Kok 2007-09-17 12:30:59 -0700 37) bc7f75fa97884 drivers/net/e1000e/82571.c (Auke Kok 2007-09-17 12:30:59 -0700 38) #include "e1000.h" And you can verify by looking at the commit: bjorn at nemi:/usr/local/src/git/linux$ git show 4662e82b2cb41 commit 4662e82b2cb41c60826e50474dd86dd5c6372b0c Author: Bruce Allan Date: Tue Aug 26 18:37:06 2008 -0700 e1000e: add support for new 82574L part This new part has the same feature set as previous parts with the addition of MSI-X support. Signed-off-by: Bruce Allan Signed-off-by: Jeff Kirsher Signed-off-by: Jeff Garzik [etc] I'll admit that this example was extremely easy. Most of the time you'll have to figure out the relevant commits by looking at code lines related to that chip. But it's still easier to look at git blame than the log if the support was added to an existing driver. Bj?rn From varyani.nitin1 at gmail.com Mon Feb 15 11:05:28 2016 From: varyani.nitin1 at gmail.com (Nitin Varyani) Date: Mon, 15 Feb 2016 21:35:28 +0530 Subject: Distributed Process Scheduling Algorithm Message-ID: Hi, I am given a task to design a distributed process scheduling algorithm. Current distributed OS are patch work over the linux kernels, that is, they are responsible for load balancing through process migration but the scheduling is taken care by the single machine linux kernels. My task is to make the scheduling algorithm itself as distributed. That is a scheduler itself makes a decision whether to migrate a task or to keep the task in the current system. I need some design aspects of how to achieve it. Another thing which I want to know is that whether this job is possible for a kernel newbie like me. Need urgent help. Nitin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160215/d07a66fd/attachment.html From rgroner at RTD.com Mon Feb 15 11:06:54 2016 From: rgroner at RTD.com (Rob Groner) Date: Mon, 15 Feb 2016 16:06:54 +0000 Subject: Finding when a chip was supported in the kernel In-Reply-To: <87fuwuvv19.fsf@nemi.mork.no> References: <87fuwuvv19.fsf@nemi.mork.no> Message-ID: > -----Original Message----- > From: Bj?rn Mork [mailto:bjorn at mork.no] > Sent: Monday, February 15, 2016 10:44 AM > To: Carlo Caione > Cc: Rob Groner ; kernelnewbies at kernelnewbies.org > Subject: Re: Finding when a chip was supported in the kernel > > Carlo Caione writes: > > > On Mon, Feb 15, 2016 at 3:44 PM, Rob Groner wrote: > >> > > git blame on the other hand, gives you this immediately: > > bjorn at nemi:/usr/local/src/git/linux$ git blame > drivers/net/ethernet/intel/e1000e/82571.c > e78b80b1079e1 drivers/net/ethernet/intel/e1000e/82571.c (David Ertman > 2014-02-04 01:56:06 +0000 1) /* Intel PRO/1000 Linux driver > [..] > bc7f75fa97884 drivers/net/e1000e/82571.c (Auke Kok 2007-09-17 > 12:30:59 -0700 21) > e921eb1ac411a drivers/net/ethernet/intel/e1000e/82571.c (Bruce Allan > 2012-11-28 09:28:37 +0000 22) /* 82571EB Gigabit Ethernet Controller > 1605927fcee41 drivers/net/e1000e/82571.c (Bruce Allan 2008-11- > 21 16:51:06 -0800 23) * 82571EB Gigabit Ethernet Controller (Copper) > bc7f75fa97884 drivers/net/e1000e/82571.c (Auke Kok 2007-09-17 > 12:30:59 -0700 24) * 82571EB Gigabit Ethernet Controller (Fiber) > ad68076e07fa0 drivers/net/e1000e/82571.c (Bruce Allan 2008-03- > 28 09:15:03 -0700 25) * 82571EB Dual Port Gigabit Mezzanine Adapter > ad68076e07fa0 drivers/net/e1000e/82571.c (Bruce Allan 2008-03- > 28 09:15:03 -0700 26) * 82571EB Quad Port Gigabit Mezzanine Adapter > ad68076e07fa0 drivers/net/e1000e/82571.c (Bruce Allan 2008-03- > 28 09:15:03 -0700 27) * 82571PT Gigabit PT Quad Port Server ExpressMo > bc7f75fa97884 drivers/net/e1000e/82571.c (Auke Kok 2007-09-17 > 12:30:59 -0700 28) * 82572EI Gigabit Ethernet Controller (Copper) > bc7f75fa97884 drivers/net/e1000e/82571.c (Auke Kok 2007-09-17 > 12:30:59 -0700 29) * 82572EI Gigabit Ethernet Controller (Fiber) > bc7f75fa97884 drivers/net/e1000e/82571.c (Auke Kok 2007-09-17 > 12:30:59 -0700 30) * 82572EI Gigabit Ethernet Controller > bc7f75fa97884 drivers/net/e1000e/82571.c (Auke Kok 2007-09-17 > 12:30:59 -0700 31) * 82573V Gigabit Ethernet Controller (Copper) > bc7f75fa97884 drivers/net/e1000e/82571.c (Auke Kok 2007-09-17 > 12:30:59 -0700 32) * 82573E Gigabit Ethernet Controller (Copper) > bc7f75fa97884 drivers/net/e1000e/82571.c (Auke Kok 2007-09-17 > 12:30:59 -0700 33) * 82573L Gigabit Ethernet Controller > 4662e82b2cb41 drivers/net/e1000e/82571.c (Bruce Allan 2008-08- > 26 18:37:06 -0700 34) * 82574L Gigabit Network Connection > 8c81c9c315b7e drivers/net/e1000e/82571.c (Alexander Duyck 2009- > 03-19 01:12:27 +0000 35) * 82583V Gigabit Network Connection > bc7f75fa97884 drivers/net/e1000e/82571.c (Auke Kok 2007-09-17 > 12:30:59 -0700 36) */ > bc7f75fa97884 drivers/net/e1000e/82571.c (Auke Kok 2007-09-17 > 12:30:59 -0700 37) > bc7f75fa97884 drivers/net/e1000e/82571.c (Auke Kok 2007-09-17 > 12:30:59 -0700 38) #include "e1000.h" > > > > And you can verify by looking at the commit: > > > bjorn at nemi:/usr/local/src/git/linux$ git show 4662e82b2cb41 commit > 4662e82b2cb41c60826e50474dd86dd5c6372b0c > Author: Bruce Allan > Date: Tue Aug 26 18:37:06 2008 -0700 > > e1000e: add support for new 82574L part > > This new part has the same feature set as previous parts with the addition > of MSI-X support. > > Signed-off-by: Bruce Allan > Signed-off-by: Jeff Kirsher > Signed-off-by: Jeff Garzik > > [etc] > > > > I'll admit that this example was extremely easy. Most of the time you'll have > to figure out the relevant commits by looking at code lines related to that > chip. But it's still easier to look at git blame than the log if the support was > added to an existing driver. > Hmm...I don't think I share the idea that it was extremely easy. :) But it is something I can try at least, assuming I can get at least as far as figuring out which driver file a particular chip gets its support from. With Intel chips, that IS pretty easy. Using the blame I see that it gives a date and a commit reference. How do I then correlate that to the kernel version where it first showed up? I'm assuming there's a git command for showing that. Rob From henrik at austad.us Mon Feb 15 11:52:31 2016 From: henrik at austad.us (Henrik Austad) Date: Mon, 15 Feb 2016 17:52:31 +0100 Subject: Distributed Process Scheduling Algorithm In-Reply-To: References: Message-ID: <20160215165231.GD21526@icarus.home.austad.us> On Mon, Feb 15, 2016 at 09:35:28PM +0530, Nitin Varyani wrote: > Hi, Hi Nitin, > I am given a task to design a distributed process scheduling algorithm. > Current distributed OS are patch work over the linux kernels, that is, they > are responsible for load balancing through process migration but the > scheduling is taken care by the single machine linux kernels. Hmm, are you talking about HPC clusters or other large machines here? I'm not familiar with this, so a few references to existing designs would be appreciated. > My task is to make the scheduling algorithm itself as distributed. Apart from my comment below, it sounds like a really interesting project. Is this a research-project or something commercial? > That is a scheduler itself makes a decision whether to migrate a task or > to keep the task in the current system. I need some design aspects of > how to achieve it. Another thing which I want to know is that whether > this job is possible for a kernel newbie like me. Need urgent help. Nitin Uhm, ok. I think this is _way_ outside the scope of Kernelnewbies, and it is definitely not a newbie project. If you are really serious about this, I'd start with listing all the different elements you need to share and then an initial idea as to how to share those between individual systems. I have an inkling that you'll find out quite fast as to why the current kernel does not support this out of the box. -- Henrik Austad -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 181 bytes Desc: Digital signature Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160215/8a8b01b8/attachment.bin From bjorn at mork.no Mon Feb 15 12:04:55 2016 From: bjorn at mork.no (=?utf-8?Q?Bj=C3=B8rn_Mork?=) Date: Mon, 15 Feb 2016 18:04:55 +0100 Subject: Finding when a chip was supported in the kernel In-Reply-To: (Rob Groner's message of "Mon, 15 Feb 2016 16:06:54 +0000") References: <87fuwuvv19.fsf@nemi.mork.no> Message-ID: <87bn7hx5u0.fsf@nemi.mork.no> Rob Groner writes: > Hmm...I don't think I share the idea that it was extremely easy. :) OK :) > But it is something I can try at least, assuming I can get at least as > far as figuring out which driver file a particular chip gets its > support from. With Intel chips, that IS pretty easy. > > Using the blame I see that it gives a date and a commit reference. > How do I then correlate that to the kernel version where it first > showed up? I'm assuming there's a git command for showing that. That was the other command Carlo gave, which I failed to quote. Sorry about that. Carlo wrote: > git describe --contains $SHA e.g bjorn at nemi:/usr/local/src/git/linux$ git describe --contains 4662e82b2cb41 v2.6.28-rc1~717^2~323 Bj?rn From rgroner at RTD.com Mon Feb 15 12:12:53 2016 From: rgroner at RTD.com (Rob Groner) Date: Mon, 15 Feb 2016 17:12:53 +0000 Subject: Finding when a chip was supported in the kernel In-Reply-To: <87bn7hx5u0.fsf@nemi.mork.no> References: <87fuwuvv19.fsf@nemi.mork.no> <87bn7hx5u0.fsf@nemi.mork.no> Message-ID: > -----Original Message----- > From: Bj?rn Mork [mailto:bjorn at mork.no] > Sent: Monday, February 15, 2016 12:05 PM > To: Rob Groner > Cc: Carlo Caione ; kernelnewbies at kernelnewbies.org > Subject: Re: Finding when a chip was supported in the kernel > > Rob Groner writes: > > > Hmm...I don't think I share the idea that it was extremely easy. :) > > OK :) > > > But it is something I can try at least, assuming I can get at least as > > far as figuring out which driver file a particular chip gets its > > support from. With Intel chips, that IS pretty easy. > > > > Using the blame I see that it gives a date and a commit reference. > > How do I then correlate that to the kernel version where it first > > showed up? I'm assuming there's a git command for showing that. > > That was the other command Carlo gave, which I failed to quote. Sorry about > that. Carlo wrote: > > > git describe --contains $SHA > > e.g > > bjorn at nemi:/usr/local/src/git/linux$ git describe --contains 4662e82b2cb41 > v2.6.28-rc1~717^2~323 > Great, thank you! Rob From Valdis.Kletnieks at vt.edu Mon Feb 15 22:37:56 2016 From: Valdis.Kletnieks at vt.edu (Valdis.Kletnieks at vt.edu) Date: Mon, 15 Feb 2016 22:37:56 -0500 Subject: Finding when a chip was supported in the kernel In-Reply-To: References: <87fuwuvv19.fsf@nemi.mork.no> Message-ID: <35346.1455593876@turing-police.cc.vt.edu> On Mon, 15 Feb 2016 16:06:54 +0000, Rob Groner said: > > bjorn at nemi:/usr/local/src/git/linux$ git show 4662e82b2cb41 > > commit 4662e82b2cb41c60826e50474dd86dd5c6372b0c > > Author: Bruce Allan > > Date: Tue Aug 26 18:37:06 2008 -0700 > Using the blame I see that it gives a date and a commit reference. How do I > then correlate that to the kernel version where it first showed up? I'm > assuming there's a git command for showing that. git tag --contains 4662e82b2cb41 should do the job for you. Note: They're sorted lexically, not in release order - so v3.21 through v3.29 are hiding between v3.2 and v3.3, -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 848 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160215/07a2da84/attachment.bin From varyani.nitin1 at gmail.com Mon Feb 15 23:48:26 2016 From: varyani.nitin1 at gmail.com (Nitin Varyani) Date: Tue, 16 Feb 2016 10:18:26 +0530 Subject: Distributed Process Scheduling Algorithm In-Reply-To: <20160215165231.GD21526@icarus.home.austad.us> References: <20160215165231.GD21526@icarus.home.austad.us> Message-ID: No doubt it is really interesting. It is a research project. The project is related to HPC clusters. I am as of now planning only to make the process scheduling algorithm distributed. Linux has already implemented SMP using Completely Fair Scheduler and I was thinking was of extending it for distributed systems. Two things need to be added to it: 1) Sending process context via network 2) Maintaining a table at each node which stores the load of each remote node. This table will be used to make a decision whether to send a process context along the network or not. Thanks for your kind help. On Mon, Feb 15, 2016 at 10:22 PM, Henrik Austad wrote: > On Mon, Feb 15, 2016 at 09:35:28PM +0530, Nitin Varyani wrote: > > Hi, > > Hi Nitin, > > > I am given a task to design a distributed process scheduling algorithm. > > Current distributed OS are patch work over the linux kernels, that is, > they > > are responsible for load balancing through process migration but the > > scheduling is taken care by the single machine linux kernels. > > Hmm, are you talking about HPC clusters or other large machines here? I'm > not familiar with this, so a few references to existing designs would be > appreciated. > > > My task is to make the scheduling algorithm itself as distributed. > > Apart from my comment below, it sounds like a really interesting project. > Is this a research-project or something commercial? > > > That is a scheduler itself makes a decision whether to migrate a task or > > to keep the task in the current system. I need some design aspects of > > how to achieve it. Another thing which I want to know is that whether > > this job is possible for a kernel newbie like me. Need urgent help. Nitin > > Uhm, ok. I think this is _way_ outside the scope of Kernelnewbies, and it > is definitely not a newbie project. > > If you are really serious about this, I'd start with listing all the > different elements you need to share and then an initial idea as to how to > share those between individual systems. I have an inkling that you'll find > out quite fast as to why the current kernel does not support this out of > the box. > > -- > Henrik Austad > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160216/5955d21c/attachment.html From Valdis.Kletnieks at vt.edu Tue Feb 16 00:13:34 2016 From: Valdis.Kletnieks at vt.edu (Valdis.Kletnieks at vt.edu) Date: Tue, 16 Feb 2016 00:13:34 -0500 Subject: Distributed Process Scheduling Algorithm In-Reply-To: References: <20160215165231.GD21526@icarus.home.austad.us> Message-ID: <42173.1455599614@turing-police.cc.vt.edu> On Tue, 16 Feb 2016 10:18:26 +0530, Nitin Varyani said: > 1) Sending process context via network Note that this is a non-trivial issue by itself. At a *minimum*, you'll need all the checkpoint-restart code. Plus, if the process has any open TCP connections, *those* have to be migrated without causing a security problem. Good luck on figuring out how to properly route packets in this case - consider 4 nodes 10.0.0.1 through 10.0.0.4, you migrate a process from 10.0.0.1 to 10.0.0.3, How do you make sure *that process*'s packets go to 0.3 while all other packets still go to 0.1. Also, consider the impact this may have on iptables, if there is a state=RELATED,CONNECTED on 0.1 - that info needs to be relayed to 0.3 as well. For bonus points, what's the most efficient way to transfer a large process image (say 500M, or even a bloated Firefox at 3.5G), without causing timeouts while copying the image? I hope your research project is *really* well funded - you're going to need a *lot* of people (Hint - find out how many people work on VMWare - that should give you a rough idea) -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 848 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160216/ce4a27b1/attachment.bin From dingel at linux.vnet.ibm.com Tue Feb 16 03:42:52 2016 From: dingel at linux.vnet.ibm.com (Dominik Dingel) Date: Tue, 16 Feb 2016 09:42:52 +0100 Subject: Distributed Process Scheduling Algorithm In-Reply-To: <42173.1455599614@turing-police.cc.vt.edu> References: <20160215165231.GD21526@icarus.home.austad.us> <42173.1455599614@turing-police.cc.vt.edu> Message-ID: <20160216094252.194c7907@BR9TG4T3.de.ibm.com> On Tue, 16 Feb 2016 00:13:34 -0500 Valdis.Kletnieks at vt.edu wrote: > On Tue, 16 Feb 2016 10:18:26 +0530, Nitin Varyani said: > > > 1) Sending process context via network > > Note that this is a non-trivial issue by itself. At a *minimum*, > you'll need all the checkpoint-restart code. Plus, if the process > has any open TCP connections, *those* have to be migrated without > causing a security problem. Good luck on figuring out how to properly > route packets in this case - consider 4 nodes 10.0.0.1 through 10.0.0.4, > you migrate a process from 10.0.0.1 to 10.0.0.3, How do you make sure > *that process*'s packets go to 0.3 while all other packets still go to > 0.1. Also, consider the impact this may have on iptables, if there is > a state=RELATED,CONNECTED on 0.1 - that info needs to be relayed to 0.3 > as well. > > For bonus points, what's the most efficient way to transfer a large > process image (say 500M, or even a bloated Firefox at 3.5G), without > causing timeouts while copying the image? > > I hope your research project is *really* well funded - you're going > to need a *lot* of people (Hint - find out how many people work on > VMWare - that should give you a rough idea) I wouldn't see things that dark. Also this is an interesting puzzle. To migrate processes I would pick an already existing solution. Like there is for container. So every process should be, if possible, in a container. To migrate them efficiently without having some distributed shared memory, you might want to look at userfaultfd. So now back to the scheduling, I do not think that every node should keep track of every process on every other node, as this would mean a massive need for communication and hurt scalability. So either you would implement something like work stealing or go for a central entity like mesos. Which could do process/job/container scheduling for you. There are now two pitfalls which are hard enough on their own: - interprocess communication between two process with something different than a socket in such an case you would probably need to merge the two distinct containers - dedicated hardware Dominik From varyani.nitin1 at gmail.com Tue Feb 16 04:46:17 2016 From: varyani.nitin1 at gmail.com (Nitin Varyani) Date: Tue, 16 Feb 2016 15:16:17 +0530 Subject: Distributed Process Scheduling Algorithm In-Reply-To: <20160216094252.194c7907@BR9TG4T3.de.ibm.com> References: <20160215165231.GD21526@icarus.home.austad.us> <42173.1455599614@turing-police.cc.vt.edu> <20160216094252.194c7907@BR9TG4T3.de.ibm.com> Message-ID: According to my project requirement, I need a distributed algorithm so mesos will not work. But work stealing is the best bargain. It will save communication costs. Thankyou. Can you please elaborate on the last part of your reply? On Tue, Feb 16, 2016 at 2:12 PM, Dominik Dingel wrote: > On Tue, 16 Feb 2016 00:13:34 -0500 > Valdis.Kletnieks at vt.edu wrote: > > > On Tue, 16 Feb 2016 10:18:26 +0530, Nitin Varyani said: > > > > > 1) Sending process context via network > > > > Note that this is a non-trivial issue by itself. At a *minimum*, > > you'll need all the checkpoint-restart code. Plus, if the process > > has any open TCP connections, *those* have to be migrated without > > causing a security problem. Good luck on figuring out how to properly > > route packets in this case - consider 4 nodes 10.0.0.1 through 10.0.0.4, > > you migrate a process from 10.0.0.1 to 10.0.0.3, How do you make sure > > *that process*'s packets go to 0.3 while all other packets still go to > > 0.1. Also, consider the impact this may have on iptables, if there is > > a state=RELATED,CONNECTED on 0.1 - that info needs to be relayed to 0.3 > > as well. > > > > For bonus points, what's the most efficient way to transfer a large > > process image (say 500M, or even a bloated Firefox at 3.5G), without > > causing timeouts while copying the image? > > > > I hope your research project is *really* well funded - you're going > > to need a *lot* of people (Hint - find out how many people work on > > VMWare - that should give you a rough idea) > > I wouldn't see things that dark. Also this is an interesting puzzle. > > To migrate processes I would pick an already existing solution. > Like there is for container. So every process should be, if possible, in a > container. > To migrate them efficiently without having some distributed shared memory, > you might want to look at userfaultfd. > > So now back to the scheduling, I do not think that every node should keep > track > of every process on every other node, as this would mean a massive need for > communication and hurt scalability. So either you would implement > something like work stealing or go for a central entity like mesos. Which > could do process/job/container scheduling for you. > > There are now two pitfalls which are hard enough on their own: > - interprocess communication between two process with something different > than a socket > in such an case you would probably need to merge the two distinct > containers > > - dedicated hardware > > Dominik > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160216/5e59d9fb/attachment.html From varyani.nitin1 at gmail.com Tue Feb 16 05:43:25 2016 From: varyani.nitin1 at gmail.com (Nitin Varyani) Date: Tue, 16 Feb 2016 16:13:25 +0530 Subject: Distributed Process Scheduling Algorithm In-Reply-To: References: <20160215165231.GD21526@icarus.home.austad.us> <42173.1455599614@turing-police.cc.vt.edu> <20160216094252.194c7907@BR9TG4T3.de.ibm.com> Message-ID: The essence of the discussion is that : We can run each process in a container and migrate the container itself. Migration can be done based on work stealing. As far as communication between processes in different containers is concerned, can't we use sockets? On Tue, Feb 16, 2016 at 3:16 PM, Nitin Varyani wrote: > According to my project requirement, I need a distributed algorithm so > mesos will not work. But work stealing is the best bargain. It will save > communication costs. Thankyou. Can you please elaborate on the last part of > your reply? > > On Tue, Feb 16, 2016 at 2:12 PM, Dominik Dingel > wrote: > >> On Tue, 16 Feb 2016 00:13:34 -0500 >> Valdis.Kletnieks at vt.edu wrote: >> >> > On Tue, 16 Feb 2016 10:18:26 +0530, Nitin Varyani said: >> > >> > > 1) Sending process context via network >> > >> > Note that this is a non-trivial issue by itself. At a *minimum*, >> > you'll need all the checkpoint-restart code. Plus, if the process >> > has any open TCP connections, *those* have to be migrated without >> > causing a security problem. Good luck on figuring out how to properly >> > route packets in this case - consider 4 nodes 10.0.0.1 through 10.0.0.4, >> > you migrate a process from 10.0.0.1 to 10.0.0.3, How do you make sure >> > *that process*'s packets go to 0.3 while all other packets still go to >> > 0.1. Also, consider the impact this may have on iptables, if there is >> > a state=RELATED,CONNECTED on 0.1 - that info needs to be relayed to 0.3 >> > as well. >> > >> > For bonus points, what's the most efficient way to transfer a large >> > process image (say 500M, or even a bloated Firefox at 3.5G), without >> > causing timeouts while copying the image? >> > >> > I hope your research project is *really* well funded - you're going >> > to need a *lot* of people (Hint - find out how many people work on >> > VMWare - that should give you a rough idea) >> >> I wouldn't see things that dark. Also this is an interesting puzzle. >> >> To migrate processes I would pick an already existing solution. >> Like there is for container. So every process should be, if possible, in >> a container. >> To migrate them efficiently without having some distributed shared memory, >> you might want to look at userfaultfd. >> >> So now back to the scheduling, I do not think that every node should keep >> track >> of every process on every other node, as this would mean a massive need >> for >> communication and hurt scalability. So either you would implement >> something like work stealing or go for a central entity like mesos. Which >> could do process/job/container scheduling for you. >> >> There are now two pitfalls which are hard enough on their own: >> - interprocess communication between two process with something different >> than a socket >> in such an case you would probably need to merge the two distinct >> containers >> >> - dedicated hardware >> >> Dominik >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160216/7dc03d87/attachment.html From dingel at linux.vnet.ibm.com Tue Feb 16 06:22:17 2016 From: dingel at linux.vnet.ibm.com (Dominik Dingel) Date: Tue, 16 Feb 2016 12:22:17 +0100 Subject: Distributed Process Scheduling Algorithm In-Reply-To: References: <20160215165231.GD21526@icarus.home.austad.us> <42173.1455599614@turing-police.cc.vt.edu> <20160216094252.194c7907@BR9TG4T3.de.ibm.com> Message-ID: <20160216122217.21c6096e@BR9TG4T3.de.ibm.com> On Tue, 16 Feb 2016 16:13:25 +0530 Nitin Varyani wrote: It is common practice to shorten your answers to mailinglists. > The essence of the discussion is that : > > We can run each process in a container and migrate the container itself. > Migration can be done based on work stealing. As far as communication > between processes in different containers is concerned, can't we use > sockets? > Migration can be done based on work stealing sounds misleading. Maybe something like: Nodes might apply the work stealing pattern by migrating the workload, encapsulated in the container. That would be the idea, if that actually works and how it would perform is up to that experiment ;). That is for new applications possible, but there may be "legacy" applications which rely on communication methods like shared memory, and pipes. If this ends in an research paper I would like to read it. Dominik From newell.roger at gmail.com Tue Feb 16 08:38:23 2016 From: newell.roger at gmail.com (Roger H Newell) Date: Tue, 16 Feb 2016 10:08:23 -0330 Subject: Patch Series Message-ID: Hi all: I have a question about creating a patch series. I'm working in drivers/staging/wilc1000 fixing code style. If for example 2 errors are reported by checkpatch.pl error A and error B, it seems logical that I could fix all occurrences of error A as one patch and all occurrences of error B in a second patch. My question is, is it OK to fix all occurrences of error A across the files inside drivers/staging/wilc1000 as one patch and all occurrences of error B across all files inside drivers/staging/wilc1000 as a second patch? The alternative would be to create a patch that fixes all errors of A and a patch that fixes all errors of B per file ? In some cases there are so many occurrences of a particular error across files it probably does make more sense to create the patches per file. Any thoughts or clarifications on this ? Cheers: Roger H. Newell -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160216/b7fc84fc/attachment.html From geyslan at gmail.com Tue Feb 16 08:52:35 2016 From: geyslan at gmail.com (Geyslan G. Bem) Date: Tue, 16 Feb 2016 10:52:35 -0300 Subject: Patch Series In-Reply-To: References: Message-ID: Hello, 2016-02-16 10:38 GMT-03:00 Roger H Newell : > Hi all: > > I have a question about creating a patch series. I'm working in > drivers/staging/wilc1000 fixing code style. If for example 2 errors are > reported by checkpatch.pl error A and error B, it seems logical that I could > fix all occurrences of error A as one patch and all occurrences of error B > in a second patch. > > My question is, is it OK to fix all occurrences of error A across the files > inside drivers/staging/wilc1000 as one patch and all occurrences of error B > across all files inside drivers/staging/wilc1000 as a second patch? I think it is. But you must rely on the maintainer's choice. Ask him/her before sending. > > The alternative would be to create a patch that fixes all errors of A and a > patch that fixes all errors of B per file ? In some cases there are so many > occurrences of a particular error across files it probably does make more > sense to create the patches per file. > > Any thoughts or clarifications on this ? Ditto. But each case must be evaluated. Some changes (error A and B) can be done in one line, so you have to analyze them. A real case would be nice for a better exemplification. > > Cheers: > Roger H. Newell > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -- Regards, Geyslan G. Bem hackingbits.com From Valdis.Kletnieks at vt.edu Tue Feb 16 11:35:11 2016 From: Valdis.Kletnieks at vt.edu (Valdis.Kletnieks at vt.edu) Date: Tue, 16 Feb 2016 11:35:11 -0500 Subject: Distributed Process Scheduling Algorithm In-Reply-To: <20160216094252.194c7907@BR9TG4T3.de.ibm.com> References: <20160215165231.GD21526@icarus.home.austad.us> <42173.1455599614@turing-police.cc.vt.edu> <20160216094252.194c7907@BR9TG4T3.de.ibm.com> Message-ID: <124507.1455640511@turing-police.cc.vt.edu> On Tue, 16 Feb 2016 09:42:52 +0100, Dominik Dingel said: > I wouldn't see things that dark. Also this is an interesting puzzle. Just pointing out *very real* issues that will require solution, unless you add strict bounds like "cannot be using network connections". Heck, even open files get interesting. How do you ensure that the file descriptor returned by mkstemp() remains valid? (The *really* ugly case is programs that do a mkstemp() and then unlink() the result, confident that the kernel will clean up when the process exits, as there is no longer a file system object to reference.... Of course, if you say "no network connections" and "no open files", the problem gets a lot easier - but also quickly devolving into a master's thesis research project rather than anything useful.... Bottom line: Don't even *think* about changing the scheduler etc until you have a functional way to actually move the process. Doesn't matter if you use a kvm approach, or containers, or whatever - if you can't do the migrate, you can't even *test* your code that decides which process to migrate..... -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 848 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160216/0a8255e9/attachment.bin From varyani.nitin1 at gmail.com Tue Feb 16 23:51:35 2016 From: varyani.nitin1 at gmail.com (Nitin Varyani) Date: Wed, 17 Feb 2016 10:21:35 +0530 Subject: Distributed Process Scheduling Algorithm In-Reply-To: <124507.1455640511@turing-police.cc.vt.edu> References: <20160215165231.GD21526@icarus.home.austad.us> <42173.1455599614@turing-police.cc.vt.edu> <20160216094252.194c7907@BR9TG4T3.de.ibm.com> <124507.1455640511@turing-police.cc.vt.edu> Message-ID: if you say "no network connections" and "no open files", the problem gets a lot easier - but also quickly devolving into a master's thesis research project rather than anything useful.... Actually it is a master's thesis research project as of now. I am ready to boil down to the most basic implementation of distributed linux kernel. Assume there is no network connection and no open files. We can drop even more assumptions if it becomes complicated. Once this basic implementation is successful, we can go ahead with a more complicated version. The next task is to integrate the migration code in the linux kernel. What is the most easy way of implementing it. On Tue, Feb 16, 2016 at 10:05 PM, wrote: > On Tue, 16 Feb 2016 09:42:52 +0100, Dominik Dingel said: > > > I wouldn't see things that dark. Also this is an interesting puzzle. > > Just pointing out *very real* issues that will require solution, unless > you add strict bounds like "cannot be using network connections". > > Heck, even open files get interesting. How do you ensure that the > file descriptor returned by mkstemp() remains valid? (The *really* > ugly case is programs that do a mkstemp() and then unlink() the result, > confident that the kernel will clean up when the process exits, as > there is no longer a file system object to reference.... > > Of course, if you say "no network connections" and "no open files", > the problem gets a lot easier - but also quickly devolving into a > master's thesis research project rather than anything useful.... > > Bottom line: Don't even *think* about changing the scheduler etc > until you have a functional way to actually move the process. Doesn't > matter if you use a kvm approach, or containers, or whatever - if > you can't do the migrate, you can't even *test* your code that decides > which process to migrate..... > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160217/fee2dfc8/attachment.html From yuzibode at 126.com Wed Feb 17 00:00:12 2016 From: yuzibode at 126.com (YU Bo) Date: Wed, 17 Feb 2016 13:00:12 +0800 (CST) Subject: Patch Series In-Reply-To: References: Message-ID: <65fa18ad.43fb.152ed99983e.Coremail.yuzibode@126.com> -- Best Regards At 2016-02-16 21:52:35, "Geyslan G. Bem" wrote: >Hello, > >2016-02-16 10:38 GMT-03:00 Roger H Newell : >> Hi all: >> >> I have a question about creating a patch series. I'm working in >> drivers/staging/wilc1000 fixing code style. If for example 2 errors are >> reported by checkpatch.pl error A and error B, it seems logical that I could >> fix all occurrences of error A as one patch and all occurrences of error B >> in a second patch. >> >> My question is, is it OK to fix all occurrences of error A across the files >> inside drivers/staging/wilc1000 as one patch and all occurrences of error B >> across all files inside drivers/staging/wilc1000 as a second patch? > >I think it is. But you must rely on the maintainer's choice. Ask >him/her before sending. Greg said that per patch resolve per issue.Maybe i am wrong..:) > >> >> The alternative would be to create a patch that fixes all errors of A and a >> patch that fixes all errors of B per file ? In some cases there are so many >> occurrences of a particular error across files it probably does make more >> sense to create the patches per file. >> >> Any thoughts or clarifications on this ? > >Ditto. But each case must be evaluated. Some changes (error A and B) >can be done in one line, so you have to analyze them. >A real case would be nice for a better exemplification. >> >> Cheers: >> Roger H. Newell >> >> _______________________________________________ >> Kernelnewbies mailing list >> Kernelnewbies at kernelnewbies.org >> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies >> > > > >-- >Regards, > >Geyslan G. Bem >hackingbits.com > >_______________________________________________ >Kernelnewbies mailing list >Kernelnewbies at kernelnewbies.org >http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160217/2968b286/attachment.html From mulyadi.santosa at gmail.com Wed Feb 17 01:10:16 2016 From: mulyadi.santosa at gmail.com (Mulyadi Santosa) Date: Wed, 17 Feb 2016 13:10:16 +0700 Subject: Process scheduling In-Reply-To: References: <20160213084904.GB21526@icarus.home.austad.us> Message-ID: On Mon, Feb 15, 2016 at 7:37 PM, Nitin Varyani wrote: > > > On Mon, Feb 15, 2016 at 6:06 PM, Nitin Varyani > wrote: > >> Hi >> I have studied LInux kernel CFS scheduling algorithm - the >> vruntime, weights, nice value, etc. I am able to understand the code. >> Actually the task given to me is really very huge. I am told to design a >> distributed process scheduling algorithm. A very simple implementation of >> it will be sufficient for me. Current distributed OS are patch work over >> the linux kernels, that is, they are responsible for load balancing through >> process migration but the scheduling is taken care by the single machine >> linux kernels. My task is to make the scheduling algorithm itself as >> distributed. That is a scheduler makes a decision whether to migrate a task >> or to keep the task in the current system. I need some design aspects of >> how to achieve it. Another thing which I want to know is that whether this >> job is possible for a kernel newbie like me. >> >> On Sat, Feb 13, 2016 at 3:12 PM, Nitin Varyani >> wrote: >> >>> thanks >>> >>> On Sat, Feb 13, 2016 at 2:19 PM, Henrik Austad wrote: >>> >>>> On Sat, Feb 13, 2016 at 11:42:57AM +0530, Nitin Varyani wrote: >>>> > Hello, >>>> >>>> Hi Nitin, >>>> >>>> > I want to understand the flow of code of process scheduler of >>>> > linux kernel. What I have understood is that >>>> > The task marks itself as sleeping, >>>> > puts itself on a wait queue, >>>> > removes itself from the red-black tree of runnable, and >>>> > calls schedule() to select a new process to execute. >>>> > >>>> > for Waking back up >>>> > The task is set as runnable, >>>> > removed from the wait queue, >>>> > and added back to the red-black tree. >>>> > >>>> > Can I get the details of which function does what? in sched/core.c >>>> and in >>>> > sched/fair.c >>>> > I am concerned only with fair scheduler. There are so many functions >>>> in >>>> > these two files that I am totally confused. >>>> >>>> Then core.c and fair.c is the best bet. >>>> >>>> You could also pick up a copy of Linux kernel development (By Love), it >>>> gives a nice introduction to the overall flow of .. well mostly >>>> everything. >>>> :) >>>> >>>> In kernel/sched/sched.h you have a struct called 'struct sched_class" >>>> which >>>> is a set of function-points. This is used by the core machinery to call >>>> into scheduling-class specific code. At the bottom of fair.c, you see >>>> said >>>> struct being populated. >>>> >>>> Also, if you want to see what really happens, try enabling >>>> function-tracing, but limit it to sched-functions only (and >>>> sched-events, >>>> those are also useful to see what triggers things) >>>> >>>> mount -t debugfs nodev /sys/kernel/debug >>>> cd /sys/kernel/debug/tracing >>>> echo 0 > tracing_on >>>> echo function > current_tracer >>>> echo "sched*" > set_ftrace_filter >>>> echo 1 > events/sched/enable >>>> echo 1 > tracing_on >>>> ... wait for a few secs >>>> echo 0 > tracing_on >>>> >>>> cat trace > /tmp/trace.txt >>>> >>>> Now, look at trace.txt and correlate it to the scheduler code :) >>>> >>>> Good luck! >>>> >>>> -- >>>> Henrik Austad >>>> >>> >>> >> > > Please don't top post :) Use bottom post . Sounds like what you're going to do is highly similar to openMosix. check their source code. Please note that openmosix is patch against 2.4.x linux kernel. When they're about to made it compatible to 2.6.x, the project stalls. See Linux IPMI project and see if you can help them out -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com This email has been sent from a virus-free computer protected by Avast. www.avast.com <#DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160217/b3e165b8/attachment.html From Valdis.Kletnieks at vt.edu Wed Feb 17 01:10:56 2016 From: Valdis.Kletnieks at vt.edu (Valdis.Kletnieks at vt.edu) Date: Wed, 17 Feb 2016 01:10:56 -0500 Subject: Distributed Process Scheduling Algorithm In-Reply-To: References: <20160215165231.GD21526@icarus.home.austad.us> <42173.1455599614@turing-police.cc.vt.edu> <20160216094252.194c7907@BR9TG4T3.de.ibm.com> <124507.1455640511@turing-police.cc.vt.edu> Message-ID: <21502.1455689456@turing-police.cc.vt.edu> On Wed, 17 Feb 2016 10:21:35 +0530, Nitin Varyani said: > Actually it is a master's thesis research project as of now. I am ready to > boil down to the most basic implementation of distributed linux kernel. > Assume there is no network connection and no open files. We can drop even > more assumptions if it becomes complicated. Once this basic implementation > is successful, we can go ahead with a more complicated version. The next > task is to integrate the migration code in the linux kernel. What is the > most easy way of implementing it. If you get it to where you can migrate a process on command controlled by a userspace process, the scheduler part will be trivial. And note that the choice of which process to migrate where is sufficiently "policy" that it belongs in userspace - see how cgroups and containers are kernel mechanisms that are controlled by userspace. You want to follow that model if you intend for this to be upstreamed rather than just another dead master's thesis. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 848 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160217/cf590d8d/attachment-0001.bin From Valdis.Kletnieks at vt.edu Wed Feb 17 01:16:11 2016 From: Valdis.Kletnieks at vt.edu (Valdis.Kletnieks at vt.edu) Date: Wed, 17 Feb 2016 01:16:11 -0500 Subject: Patch Series In-Reply-To: <65fa18ad.43fb.152ed99983e.Coremail.yuzibode@126.com> References: <65fa18ad.43fb.152ed99983e.Coremail.yuzibode@126.com> Message-ID: <21927.1455689771@turing-police.cc.vt.edu> >>> My question is, is it OK to fix all occurrences of error A across the files >> inside drivers/staging/wilc1000 as one patch and all occurrences of error B >> across all files inside drivers/staging/wilc1000 as a second patch? Most maintainers would be perfectly OK with that. And I'm pretty sure that Greg KH (maintainer of drivers/staging) would accept that sort of patch series. If he isn't, I'm sure he'll correct me. :) -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 848 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160217/5a10b0f8/attachment.bin From mfidelman at meetinghouse.net Wed Feb 17 01:37:06 2016 From: mfidelman at meetinghouse.net (Miles Fidelman) Date: Wed, 17 Feb 2016 01:37:06 -0500 Subject: Distributed Process Scheduling Algorithm In-Reply-To: <21502.1455689456@turing-police.cc.vt.edu> References: <20160215165231.GD21526@icarus.home.austad.us> <42173.1455599614@turing-police.cc.vt.edu> <20160216094252.194c7907@BR9TG4T3.de.ibm.com> <124507.1455640511@turing-police.cc.vt.edu> <21502.1455689456@turing-police.cc.vt.edu> Message-ID: <56C41512.4000100@meetinghouse.net> On 2/17/16 1:10 AM, Valdis.Kletnieks at vt.edu wrote: > On Wed, 17 Feb 2016 10:21:35 +0530, Nitin Varyani said: > >> Actually it is a master's thesis research project as of now. I am ready to >> boil down to the most basic implementation of distributed linux kernel. >> Assume there is no network connection and no open files. We can drop even >> more assumptions if it becomes complicated. Once this basic implementation >> is successful, we can go ahead with a more complicated version. The next >> task is to integrate the migration code in the linux kernel. What is the >> most easy way of implementing it. > If you get it to where you can migrate a process on command controlled by > a userspace process, the scheduler part will be trivial. > If you want some ideas about distributed process scheduling, you might want to explore how Erlang's run-time works - it's all about massive concurrency and scheduling processes (well, really light-weight processes) across multiple cores. If you google "distributed process scheduling erlang" you'll also find some work about process scheduling across clusters, particularly for gaming environments. How much might be applicable in a linux kernel environment is unclear - but, then, it's your research project. Miles Fidelman In theory, there is no difference between theory and practice. In practice, there is. .... Yogi Berra From varyani.nitin1 at gmail.com Wed Feb 17 02:18:33 2016 From: varyani.nitin1 at gmail.com (Nitin Varyani) Date: Wed, 17 Feb 2016 12:48:33 +0530 Subject: Process scheduling In-Reply-To: References: <20160213084904.GB21526@icarus.home.austad.us> Message-ID: It is similar to openMosix but still quite different. Open Mosix is built on the top of existing linux kernels. The scheduling is taken care by the existing linux kernels. Open Mosix is responsible for workload distribution. This project is first of its kind. On Wed, Feb 17, 2016 at 11:40 AM, Mulyadi Santosa wrote: > > > On Mon, Feb 15, 2016 at 7:37 PM, Nitin Varyani > wrote: > >> >> >> On Mon, Feb 15, 2016 at 6:06 PM, Nitin Varyani >> wrote: >> >>> Hi >>> I have studied LInux kernel CFS scheduling algorithm - the >>> vruntime, weights, nice value, etc. I am able to understand the code. >>> Actually the task given to me is really very huge. I am told to design >>> a distributed process scheduling algorithm. A very simple implementation of >>> it will be sufficient for me. Current distributed OS are patch work over >>> the linux kernels, that is, they are responsible for load balancing through >>> process migration but the scheduling is taken care by the single machine >>> linux kernels. My task is to make the scheduling algorithm itself as >>> distributed. That is a scheduler makes a decision whether to migrate a task >>> or to keep the task in the current system. I need some design aspects of >>> how to achieve it. Another thing which I want to know is that whether this >>> job is possible for a kernel newbie like me. >>> >>> On Sat, Feb 13, 2016 at 3:12 PM, Nitin Varyani >> > wrote: >>> >>>> thanks >>>> >>>> On Sat, Feb 13, 2016 at 2:19 PM, Henrik Austad >>>> wrote: >>>> >>>>> On Sat, Feb 13, 2016 at 11:42:57AM +0530, Nitin Varyani wrote: >>>>> > Hello, >>>>> >>>>> Hi Nitin, >>>>> >>>>> > I want to understand the flow of code of process scheduler >>>>> of >>>>> > linux kernel. What I have understood is that >>>>> > The task marks itself as sleeping, >>>>> > puts itself on a wait queue, >>>>> > removes itself from the red-black tree of runnable, and >>>>> > calls schedule() to select a new process to execute. >>>>> > >>>>> > for Waking back up >>>>> > The task is set as runnable, >>>>> > removed from the wait queue, >>>>> > and added back to the red-black tree. >>>>> > >>>>> > Can I get the details of which function does what? in sched/core.c >>>>> and in >>>>> > sched/fair.c >>>>> > I am concerned only with fair scheduler. There are so many functions >>>>> in >>>>> > these two files that I am totally confused. >>>>> >>>>> Then core.c and fair.c is the best bet. >>>>> >>>>> You could also pick up a copy of Linux kernel development (By Love), it >>>>> gives a nice introduction to the overall flow of .. well mostly >>>>> everything. >>>>> :) >>>>> >>>>> In kernel/sched/sched.h you have a struct called 'struct sched_class" >>>>> which >>>>> is a set of function-points. This is used by the core machinery to call >>>>> into scheduling-class specific code. At the bottom of fair.c, you see >>>>> said >>>>> struct being populated. >>>>> >>>>> Also, if you want to see what really happens, try enabling >>>>> function-tracing, but limit it to sched-functions only (and >>>>> sched-events, >>>>> those are also useful to see what triggers things) >>>>> >>>>> mount -t debugfs nodev /sys/kernel/debug >>>>> cd /sys/kernel/debug/tracing >>>>> echo 0 > tracing_on >>>>> echo function > current_tracer >>>>> echo "sched*" > set_ftrace_filter >>>>> echo 1 > events/sched/enable >>>>> echo 1 > tracing_on >>>>> ... wait for a few secs >>>>> echo 0 > tracing_on >>>>> >>>>> cat trace > /tmp/trace.txt >>>>> >>>>> Now, look at trace.txt and correlate it to the scheduler code :) >>>>> >>>>> Good luck! >>>>> >>>>> -- >>>>> Henrik Austad >>>>> >>>> >>>> >>> >> >> > > Please don't top post :) Use bottom post . > > Sounds like what you're going to do is highly similar to openMosix. check > their source code. > > Please note that openmosix is patch against 2.4.x linux kernel. When > they're about to made it compatible to 2.6.x, the project stalls. See Linux > IPMI project and see if you can help them out > > -- > regards, > > Mulyadi Santosa > Freelance Linux trainer and consultant > > blog: the-hydra.blogspot.com > training: mulyaditraining.blogspot.com > > This email has been sent from a virus-free computer protected by Avast. > www.avast.com > <#1657133857_DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160217/3c7bb1c7/attachment.html From mudongliangabcd at gmail.com Wed Feb 17 02:52:45 2016 From: mudongliangabcd at gmail.com (=?UTF-8?B?5oWV5Yas5Lqu?=) Date: Wed, 17 Feb 2016 15:52:45 +0800 Subject: Help about Ctrl-Z and Ctrl-Y(urgent) Message-ID: Hi everyone, Unix systems support a large number of special characters that receive special processing by the OS. One such character is the ?suspend? character (ctrl-Z by default), that causes a SIGTSTP signal to be sent to the application process. The default action for the signal is to suspend execution of the process. The system responds to the suspend character (by sending the signal) as soon as possible after it is typed in. In older Unix systems there was another special character known as the ?delayed suspend? character (ctrl-Y by default) that had the same effect as the suspend character, except that the signal is sent when the application process consumes the character, rather than right away. (That this feature is no longer supported is perhaps some indication of how useful it was ...) The suspend and the delayed-suspend characters have the effect, when they are processed, of deleting all characters currently waiting to be read by the user application that arrived before them. Explain, how both special characters are implemented? -- My best regards to you. No System Is Safe! mudongliang From varyani.nitin1 at gmail.com Wed Feb 17 05:35:17 2016 From: varyani.nitin1 at gmail.com (Nitin Varyani) Date: Wed, 17 Feb 2016 16:05:17 +0530 Subject: Distributed Process Scheduling Algorithm In-Reply-To: <21502.1455689456@turing-police.cc.vt.edu> References: <20160215165231.GD21526@icarus.home.austad.us> <42173.1455599614@turing-police.cc.vt.edu> <20160216094252.194c7907@BR9TG4T3.de.ibm.com> <124507.1455640511@turing-police.cc.vt.edu> <21502.1455689456@turing-police.cc.vt.edu> Message-ID: Having got some clarity of what I have to do, I want to now proceed for a step by step development. What all I know about linux kernels is a theoretical understanding of its various components (from the book of Robert Love) but as far as practical is concerned, I know the following things: 1) Linking modules dynamically to kernel at run time ( outside source tree and inside source tree) 2) Adding system calls Rather than trying to go blind folded in getting practical experience of linux programming, I want to gain experience only in relation to my task of creating a distributed process scheduler. What all things should I try to work with to understand the kernel CFS scheduler well? Please provide sufficient literature for the practical work. Also what is the best place to learn about implementing linux containers? On Wed, Feb 17, 2016 at 11:40 AM, wrote: > On Wed, 17 Feb 2016 10:21:35 +0530, Nitin Varyani said: > >> Actually it is a master's thesis research project as of now. I am ready to >> boil down to the most basic implementation of distributed linux kernel. >> Assume there is no network connection and no open files. We can drop even >> more assumptions if it becomes complicated. Once this basic implementation >> is successful, we can go ahead with a more complicated version. The next >> task is to integrate the migration code in the linux kernel. What is the >> most easy way of implementing it. > > If you get it to where you can migrate a process on command controlled by > a userspace process, the scheduler part will be trivial. > > And note that the choice of which process to migrate where is sufficiently > "policy" that it belongs in userspace - see how cgroups and containers are > kernel mechanisms that are controlled by userspace. You want to follow that > model if you intend for this to be upstreamed rather than just another dead > master's thesis. From greg at kroah.com Wed Feb 17 10:32:42 2016 From: greg at kroah.com (Greg KH) Date: Wed, 17 Feb 2016 07:32:42 -0800 Subject: Distributed Process Scheduling Algorithm In-Reply-To: References: <20160215165231.GD21526@icarus.home.austad.us> <42173.1455599614@turing-police.cc.vt.edu> <20160216094252.194c7907@BR9TG4T3.de.ibm.com> <124507.1455640511@turing-police.cc.vt.edu> <21502.1455689456@turing-police.cc.vt.edu> Message-ID: <20160217153242.GA15814@kroah.com> On Wed, Feb 17, 2016 at 04:05:17PM +0530, Nitin Varyani wrote: > Rather than trying to go blind folded in getting practical experience > of linux programming, I want to gain experience only in relation to my > task of creating a distributed process scheduler. What all things > should I try to work with to understand the kernel CFS scheduler well? > Please provide sufficient literature for the practical work. > Also what is the best place to learn about implementing linux containers? Why are you asking other people to do your research work for you? That's pretty rude, does your professor know this is what you are doing? greg k-h From greg at kroah.com Wed Feb 17 11:22:51 2016 From: greg at kroah.com (Greg KH) Date: Wed, 17 Feb 2016 08:22:51 -0800 Subject: Help about Ctrl-Z and Ctrl-Y(urgent) In-Reply-To: References: Message-ID: <20160217162251.GA21722@kroah.com> On Wed, Feb 17, 2016 at 03:52:45PM +0800, ??? wrote: > Hi everyone, > Unix systems support a large number of special characters that > receive special processing by the OS. One such character is the > ?suspend? character (ctrl-Z by default), that causes a SIGTSTP signal > to be sent to the application process. The default action for the > signal is to suspend execution of the process. The system responds to > the suspend character (by sending the signal) as soon as possible > after it is typed in. In older Unix systems there was another special > character known as the ?delayed suspend? character (ctrl-Y by default) > that had the same effect as the suspend character, except that the > signal is sent when the application process consumes the character, > rather than right away. (That this feature is no longer supported is > perhaps some indication of how useful it was ...) The suspend and the > delayed-suspend characters have the effect, when they are processed, > of deleting all characters currently waiting to be read by the user > application that arrived before them. Explain, how both special > characters are implemented? That sounds like a homework question, why exactly do you need/want to know this, and what have you done already to try to figure it out yourself? greg k-h From greg at kroah.com Wed Feb 17 11:23:41 2016 From: greg at kroah.com (Greg KH) Date: Wed, 17 Feb 2016 08:23:41 -0800 Subject: Process scheduling In-Reply-To: References: <20160213084904.GB21526@icarus.home.austad.us> Message-ID: <20160217162341.GB21722@kroah.com> On Wed, Feb 17, 2016 at 12:48:33PM +0530, Nitin Varyani wrote: > It is similar to openMosix but still quite different. Open Mosix is built on > the top of existing linux kernels. The scheduling is taken care by the existing > linux kernels. Open Mosix is responsible for workload distribution. This > project is first of its kind. No, it's not, it's been tried before, I suggest doing a bit more research before making statements like that. good luck, greg k-h From nayobix at nayobix.org Wed Feb 17 16:13:11 2016 From: nayobix at nayobix.org (Boyan Vladinov) Date: Wed, 17 Feb 2016 23:13:11 +0200 Subject: Process scheduling In-Reply-To: <20160217162341.GB21722@kroah.com> References: <20160213084904.GB21526@icarus.home.austad.us> <20160217162341.GB21722@kroah.com> Message-ID: <56C4E267.3010509@nayobix.org> Check here: https://www.kernel.org/doc/Documentation/scheduler/sched-design-CFS.txt and http://www.ibm.com/developerworks/library/l-completely-fair-scheduler/ Regards, Boyan Vladinov On 17.02.2016 18:23, Greg KH wrote: > On Wed, Feb 17, 2016 at 12:48:33PM +0530, Nitin Varyani wrote: >> It is similar to openMosix but still quite different. Open Mosix is built on >> the top of existing linux kernels. The scheduling is taken care by the existing >> linux kernels. Open Mosix is responsible for workload distribution. This >> project is first of its kind. > No, it's not, it's been tried before, I suggest doing a bit more > research before making statements like that. > > good luck, > > greg k-h > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies From nayobix at nayobix.org Wed Feb 17 16:11:38 2016 From: nayobix at nayobix.org (Boyan Vladinov) Date: Wed, 17 Feb 2016 23:11:38 +0200 Subject: Process scheduling In-Reply-To: <20160217162341.GB21722@kroah.com> References: <20160213084904.GB21526@icarus.home.austad.us> <20160217162341.GB21722@kroah.com> Message-ID: <56C4E20A.4090601@nayobix.org> Check here: https://www.kernel.org/doc/Documentation/scheduler/sched-design-CFS.txt and http://www.ibm.com/developerworks/library/l-completely-fair-scheduler/ Regards, Boyan Vladinov On 17.02.2016 18:23, Greg KH wrote: > On Wed, Feb 17, 2016 at 12:48:33PM +0530, Nitin Varyani wrote: >> It is similar to openMosix but still quite different. Open Mosix is built on >> the top of existing linux kernels. The scheduling is taken care by the existing >> linux kernels. Open Mosix is responsible for workload distribution. This >> project is first of its kind. > No, it's not, it's been tried before, I suggest doing a bit more > research before making statements like that. > > good luck, > > greg k-h > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies From varyani.nitin1 at gmail.com Wed Feb 17 23:35:40 2016 From: varyani.nitin1 at gmail.com (Nitin Varyani) Date: Thu, 18 Feb 2016 10:05:40 +0530 Subject: Distributed Process Scheduling Algorithm In-Reply-To: <20160217153242.GA15814@kroah.com> References: <20160215165231.GD21526@icarus.home.austad.us> <42173.1455599614@turing-police.cc.vt.edu> <20160216094252.194c7907@BR9TG4T3.de.ibm.com> <124507.1455640511@turing-police.cc.vt.edu> <21502.1455689456@turing-police.cc.vt.edu> <20160217153242.GA15814@kroah.com> Message-ID: @ Greg: Since I am very new to the field, with the huge task in hand and a short time span of 3 months given for this project, I am looking for specific directions from the linux experts to work on. As far as efforts are concerned, I am taking out hours together to research into this area. I do not mind telling this to my professor. Still, I am always looking for improvement. I will try to put more endeavor and seek as less help as possible. I hope you will not mind my reply. Thanks. On Wed, Feb 17, 2016 at 9:02 PM, Greg KH wrote: > On Wed, Feb 17, 2016 at 04:05:17PM +0530, Nitin Varyani wrote: >> Rather than trying to go blind folded in getting practical experience >> of linux programming, I want to gain experience only in relation to my >> task of creating a distributed process scheduler. What all things >> should I try to work with to understand the kernel CFS scheduler well? >> Please provide sufficient literature for the practical work. >> Also what is the best place to learn about implementing linux containers? > > Why are you asking other people to do your research work for you? > That's pretty rude, does your professor know this is what you are doing? > > greg k-h From mulyadi.santosa at gmail.com Thu Feb 18 04:31:53 2016 From: mulyadi.santosa at gmail.com (Mulyadi Santosa) Date: Thu, 18 Feb 2016 16:31:53 +0700 Subject: Distributed Process Scheduling Algorithm In-Reply-To: References: <20160215165231.GD21526@icarus.home.austad.us> <42173.1455599614@turing-police.cc.vt.edu> <20160216094252.194c7907@BR9TG4T3.de.ibm.com> <124507.1455640511@turing-police.cc.vt.edu> <21502.1455689456@turing-police.cc.vt.edu> <20160217153242.GA15814@kroah.com> Message-ID: On Thu, Feb 18, 2016 at 11:35 AM, Nitin Varyani wrote: > @ Greg: Since I am very new to the field, with the huge task in hand > and a short time span of 3 months given for this project, I am looking > for specific directions from the linux experts to work on. As far as > efforts are concerned, I am taking out hours together to research into > this area. I do not mind telling this to my professor. Still, I am > always looking for improvement. I will try to put more endeavor and > seek as less help as possible. I hope you will not mind my reply. > Thanks. > > On Wed, Feb 17, 2016 at 9:02 PM, Greg KH wrote: > > On Wed, Feb 17, 2016 at 04:05:17PM +0530, Nitin Varyani wrote: > >> Rather than trying to go blind folded in getting practical experience > >> of linux programming, I want to gain experience only in relation to my > >> task of creating a distributed process scheduler. What all things > >> should I try to work with to understand the kernel CFS scheduler well? > >> Please provide sufficient literature for the practical work. > >> Also what is the best place to learn about implementing linux > containers? > > > > Why are you asking other people to do your research work for you? > > That's pretty rude, does your professor know this is what you are doing? > > > > greg k-h > > Dear Nitin Again, please don't top post :) That's considered rude too, at least here :) I can't speak on behalf of Greg, but I guess the basic idea of why people gather in this mailing list is to share ideas and discuss, but not giving very specific guidance. If that's the goal, this list would be named "kernel mentoring", don't you agree? :) So, if we follow this "discussion area" rule, I can give you ideas: - maybe your scope of work is too wide. Try to be more specific. 3 months time span is very short compared to what you're going to do (IIUC). As other already pointed, maybe you can piggy back on Erlang project and enhance their work instead? - do you have solid background of kernel programming, especially related to scheduler? if not, try to get a grasp quickly using code navigator e.g cscope or lxr.linux.no and play around with the code first. It might give direct experience on how code works and at the same time how kernel build mechanism work Hope it helps.... -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160218/bd6bf1f1/attachment.html From joseph.bisch at gmail.com Thu Feb 18 06:25:46 2016 From: joseph.bisch at gmail.com (Joseph Bisch) Date: Thu, 18 Feb 2016 06:25:46 -0500 Subject: Question regarding upstreaming patches written by multiple people and checkpatch Message-ID: Hi, I am trying to upstream a patch set that wasn't written by me. The original patch has a lot of warnings and errors reported by checkpatch. Someone else corrected some of those with another patch and I added on a third patch correcting the rest of the warnings and errors that I thought were appropriate to fix. When checkpatch is run on the file that the patches affect, the output looks okay to me, but when I run checkpatch on the patches themselves, the patches still have the same errors and warnings, because I made my changes in a separate patch. So is it okay to have checkpatch errors/warnings for individual patches as long as the patch series as a whole is reasonably checkpatch clean or should I be amending my changes to the original commit and squashing the other cleanup patch into the first patch, so that I am left with one patch that passes checkpatch? If I should be squashing the patches into a single patch, how do I handle the signed-off-by lines as each of the three patches is currently signed off by the respective author of the patch? Obviously I can sign off on the squashed patch for myself. Do I just send it to the mailing list with just my sign off and CC the authors, so that they can sign off on it? From what I've been told, it sounds like CC'ing the authors and having them reply with their sign off is the appropriate way to handle this, but I want to make sure before I start mailing out patches, and this isn't something that I have been able to find an answer to. Cheers, Joseph From mike at flyn.org Thu Feb 18 13:05:08 2016 From: mike at flyn.org (W. Michael Petullo) Date: Thu, 18 Feb 2016 13:05:08 -0500 Subject: Walk list of processes attached to a shared page Message-ID: <20160218180508.GA32559@imp.flyn.org> Is it possible to walk the processes already attached to a shared page in an implementation of security_shm_shmat()? I have a function: static int my_shm_shmat(struct shmid_kernel *shp, char __user *shmaddr, int shmflag) and I would like to find the processes already attached. It seems like rmap_walk() would help, but I cannot figure out how to get an appropriate struct page out of a struct shmid_kernel or unmapped address (i.e., shmaddr above). -- Mike :wq From greg at kroah.com Thu Feb 18 13:46:00 2016 From: greg at kroah.com (Greg KH) Date: Thu, 18 Feb 2016 10:46:00 -0800 Subject: Question regarding upstreaming patches written by multiple people and checkpatch In-Reply-To: References: Message-ID: <20160218184600.GA10115@kroah.com> On Thu, Feb 18, 2016 at 06:25:46AM -0500, Joseph Bisch wrote: > Hi, > > I am trying to upstream a patch set that wasn't written by me. The > original patch has a lot of warnings and errors reported by > checkpatch. Someone else corrected some of those with another patch > and I added on a third patch correcting the rest of the warnings and > errors that I thought were appropriate to fix. > > When checkpatch is run on the file that the patches affect, the output > looks okay to me, but when I run checkpatch on the patches themselves, > the patches still have the same errors and warnings, because I made my > changes in a separate patch. > > So is it okay to have checkpatch errors/warnings for individual > patches as long as the patch series as a whole is reasonably > checkpatch clean Usually, yes, this is fine. But it can depend on the subsystem / area of the kernel you are submitting this for, what type of code is this? What maintainer(s) are you going to have to send the patches to? > or should I be amending my changes to the original > commit and squashing the other cleanup patch into the first patch, so > that I am left with one patch that passes checkpatch? I would preserve original authorship and signed-off-by as much as possible. Hope this helps, greg k-h From joseph.bisch at gmail.com Thu Feb 18 15:21:44 2016 From: joseph.bisch at gmail.com (Joseph Bisch) Date: Thu, 18 Feb 2016 15:21:44 -0500 Subject: Question regarding upstreaming patches written by multiple people and checkpatch In-Reply-To: <20160218184600.GA10115@kroah.com> References: <20160218184600.GA10115@kroah.com> Message-ID: On Thu, Feb 18, 2016 at 1:46 PM, Greg KH wrote: > On Thu, Feb 18, 2016 at 06:25:46AM -0500, Joseph Bisch wrote: >> Hi, >> >> I am trying to upstream a patch set that wasn't written by me. The >> original patch has a lot of warnings and errors reported by >> checkpatch. Someone else corrected some of those with another patch >> and I added on a third patch correcting the rest of the warnings and >> errors that I thought were appropriate to fix. >> >> When checkpatch is run on the file that the patches affect, the output >> looks okay to me, but when I run checkpatch on the patches themselves, >> the patches still have the same errors and warnings, because I made my >> changes in a separate patch. >> >> So is it okay to have checkpatch errors/warnings for individual >> patches as long as the patch series as a whole is reasonably >> checkpatch clean > > Usually, yes, this is fine. > > But it can depend on the subsystem / area of the kernel you are > submitting this for, what type of code is this? What maintainer(s) are > you going to have to send the patches to? The patch set[0] (link doesn't include my patch) is a driver for the quadrature encoder pulse decoder unit on the AM33xx series SoC. According to get_maintainer.pl, I am sending the patches to OMAP DEVICE TREE SUPPORT maintainers, OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS maintainers, the ARM PORT maintainer, you and the other CHAR and MISC DRIVERS supporter, and the mailing lists. >> or should I be amending my changes to the original >> commit and squashing the other cleanup patch into the first patch, so >> that I am left with one patch that passes checkpatch? > > I would preserve original authorship and signed-off-by as much as > possible. Okay. The author of the second patch said I should squash it into the first (because it was just an upstream kernel interface change), so I put the commit message from the second patch (because it was just one line) in brackets between the two sign off lines as I've seen maintainers do when they need to make a last minute change before accepting a patch. Should I have done it that way? Or would you still keep them as separate patches? > Hope this helps, Yes it does. Thanks! [0] - https://github.com/RobertCNelson/linux-dev/tree/master/patches/beaglebone/eqep Joseph From mudongliangabcd at gmail.com Thu Feb 18 23:59:15 2016 From: mudongliangabcd at gmail.com (=?UTF-8?B?5oWV5Yas5Lqu?=) Date: Fri, 19 Feb 2016 12:59:15 +0800 Subject: Help about Ctrl-Z and Ctrl-Y(urgent) In-Reply-To: <20160217162251.GA21722@kroah.com> References: <20160217162251.GA21722@kroah.com> Message-ID: Hi, This question is provided by one of my friends. He only provided me little information. I didn't know much detail in this part. I have searched the relative information on the network. But with no good result. So I asked for help in mailing list. 2016-02-18 0:22 GMT+08:00 Greg KH : > On Wed, Feb 17, 2016 at 03:52:45PM +0800, ??? wrote: >> Hi everyone, >> Unix systems support a large number of special characters that >> receive special processing by the OS. One such character is the >> ?suspend? character (ctrl-Z by default), that causes a SIGTSTP signal >> to be sent to the application process. The default action for the >> signal is to suspend execution of the process. The system responds to >> the suspend character (by sending the signal) as soon as possible >> after it is typed in. In older Unix systems there was another special >> character known as the ?delayed suspend? character (ctrl-Y by default) >> that had the same effect as the suspend character, except that the >> signal is sent when the application process consumes the character, >> rather than right away. (That this feature is no longer supported is >> perhaps some indication of how useful it was ...) The suspend and the >> delayed-suspend characters have the effect, when they are processed, >> of deleting all characters currently waiting to be read by the user >> application that arrived before them. Explain, how both special >> characters are implemented? > > That sounds like a homework question, why exactly do you need/want to > know this, and what have you done already to try to figure it out > yourself? > > greg k-h -- My best regards to you. No System Is Safe! mudongliang From greg at kroah.com Fri Feb 19 00:06:05 2016 From: greg at kroah.com (Greg KH) Date: Thu, 18 Feb 2016 21:06:05 -0800 Subject: Distributed Process Scheduling Algorithm In-Reply-To: References: <20160215165231.GD21526@icarus.home.austad.us> <42173.1455599614@turing-police.cc.vt.edu> <20160216094252.194c7907@BR9TG4T3.de.ibm.com> <124507.1455640511@turing-police.cc.vt.edu> <21502.1455689456@turing-police.cc.vt.edu> <20160217153242.GA15814@kroah.com> Message-ID: <20160219050605.GA11210@kroah.com> On Thu, Feb 18, 2016 at 10:05:40AM +0530, Nitin Varyani wrote: > @ Greg: Since I am very new to the field, with the huge task in hand > and a short time span of 3 months given for this project, 3 months? That's way too short, this is a multi-year/decade type research project. You can barely write a "simple" kernel driver in 3 months start to finish unless you _really_ know what you are doing. I suggest get a new professor / advisor, this one doesn't seem to realize the scope of the work involved :) good luck! greg k-h From ruben at mrbrklyn.com Fri Feb 19 10:31:10 2016 From: ruben at mrbrklyn.com (Ruben Safir) Date: Fri, 19 Feb 2016 10:31:10 -0500 Subject: Distributed Process Scheduling Algorithm In-Reply-To: <20160219050605.GA11210@kroah.com> References: <42173.1455599614@turing-police.cc.vt.edu> <20160216094252.194c7907@BR9TG4T3.de.ibm.com> <124507.1455640511@turing-police.cc.vt.edu> <21502.1455689456@turing-police.cc.vt.edu> <20160217153242.GA15814@kroah.com> <20160219050605.GA11210@kroah.com> Message-ID: <20160219153110.GA2358@www.mrbrklyn.com> On Thu, Feb 18, 2016 at 09:06:05PM -0800, Greg KH wrote: > On Thu, Feb 18, 2016 at 10:05:40AM +0530, Nitin Varyani wrote: > > @ Greg: Since I am very new to the field, with the huge task in hand > > and a short time span of 3 months given for this project, > Are you formally trained froma university? I'm just asking because I know that many core coders don't even have a college background in comp sci. So I'm just curious as to the path you took. Reuvain > 3 months? That's way too short, this is a multi-year/decade type > research project. You can barely write a "simple" kernel driver in 3 > months start to finish unless you _really_ know what you are doing. > > I suggest get a new professor / advisor, this one doesn't seem to > realize the scope of the work involved :) > > good luck! > > greg k-h > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies -- So many immigrant groups have swept through our town that Brooklyn, like Atlantis, reaches mythological proportions in the mind of the world - RI Safir 1998 http://www.mrbrklyn.com DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002 http://www.nylxs.com - Leadership Development in Free Software http://www2.mrbrklyn.com/resources - Unpublished Archive http://www.coinhangout.com - coins! http://www.brooklyn-living.com Being so tracked is for FARM ANIMALS and and extermination camps, but incompatible with living as a free human being. -RI Safir 2013 From tochansky at tochlab.net Fri Feb 19 10:17:59 2016 From: tochansky at tochlab.net (tochansky at tochlab.net) Date: Fri, 19 Feb 2016 18:17:59 +0300 Subject: Difference dma_alloc_coherent() in x86_32 and x86_64 Message-ID: Hello! I have a driver for PCI device which uses CMA framework for allocating big coherent blocks of memory for DMA. Allocation looks like: typedef struct { struct list_head list; uint32_t size8; void *kaddr; dma_addr_t paddr; } dma_region_t; LIST_HEAD(region_list); ...... void* AllocDMA( size_t size ) { dma_region_t *new_region; new_region = kmalloc(sizeof(dma_region_t), GFP_KERNEL); new_region->size8 = size; new_region->kaddr = dma_alloc_coherent( NULL, size, &new_region->paddr, GFP_KERNEL | GFP_DMA32 ); list_add(&new_region->list, ®ion_list); printk("pcidev: cma_alloc paddr %pad kaddr %p size %d\n", &new_region->paddr, new_region->kaddr, new_region->size8); return new_region->kaddr; } It works fine on kernel 3.18.26 in 32bit mode. When I reconfigure same kernel to run in 64bit mode(enabling in 'menuconfig' option '64-bit kernel') and trying to use this driver with it allocation failed with message in dmesg: ... [ 1393.835535] fallback device: swiotlb buffer is full (sz: 8388608 bytes) [ 1393.835579] pcidev: cma_alloc paddr 0xffff880234861220 kaddr (null) size 8388608 ... My kernel command line is: swiotlb=16384 iommu=soft cma=256M Anyone can explain this strange behavior? -- D From mashemat at gmail.com Sat Feb 20 05:08:23 2016 From: mashemat at gmail.com (masoud hematpour) Date: Sat, 20 Feb 2016 11:08:23 +0100 Subject: call graph Message-ID: Hello all, I need to create call graph of memory management. Is there any tool. I found "cflow" but the output is not good enough. Can anyone help me in preparing? or I should prepare manually. Thank you -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160220/f16f7c97/attachment.html From mulyadi.santosa at gmail.com Sat Feb 20 13:24:23 2016 From: mulyadi.santosa at gmail.com (Mulyadi Santosa) Date: Sun, 21 Feb 2016 01:24:23 +0700 Subject: call graph In-Reply-To: References: Message-ID: On Sat, Feb 20, 2016 at 5:08 PM, masoud hematpour wrote: > > Hello all, > > I need to create call graph of memory management. Is there any tool. > I found "cflow" but the output is not good enough. Can anyone help me in > preparing? > or I should prepare manually. > > > Thank you > > Hi... Have you check CodeViz? http://www.csn.ul.ie/~mel/projects/codeviz/ also check this blog entry: http://deferred.io/2015/10/27/visualizing-linux-kernel-call-graphs.html One advice: try to be more specific when generating call graph i.e graph of page in. Other wise, you might find yourself generating too complex graph -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160221/35a1e028/attachment.html From andi.platschek at gmail.com Sun Feb 21 02:54:20 2016 From: andi.platschek at gmail.com (Andreas Platschek) Date: Sun, 21 Feb 2016 08:54:20 +0100 Subject: call graph In-Reply-To: References: Message-ID: <56C96D2C.9090002@gmail.com> Hi, On 2016-02-20 19:24, Mulyadi Santosa wrote: > > > On Sat, Feb 20, 2016 at 5:08 PM, masoud hematpour > wrote: > > > Hello all, > > I need to create call graph of memory management. Is there any tool. > I found "cflow" but the output is not good enough. Can anyone help > me in preparing? > or I should prepare manually. > > > Thank you > > Hi... > > Have you check CodeViz? > http://www.csn.ul.ie/~mel/projects/codeviz/ > > I just looked at codeviz 2 weeks ago, and I would recommend to use the "alternative method" with ncc (http://students.ceid.upatras.gr/~sxanth/ncc/) as it is a lot simpler to set it up (no need for a patched version of gcc, etc.) and it is able to traverse function pointers. thx! andi > also check this blog entry: > http://deferred.io/2015/10/27/visualizing-linux-kernel-call-graphs.html > > One advice: try to be more specific when generating call graph i.e > graph of page in. Other wise, you might find yourself generating too > complex graph > > > > > -- > regards, > > Mulyadi Santosa > Freelance Linux trainer and consultant > > blog: the-hydra.blogspot.com > training: mulyaditraining.blogspot.com > > > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies From mashemat at gmail.com Sun Feb 21 05:46:05 2016 From: mashemat at gmail.com (masoud hematpour) Date: Sun, 21 Feb 2016 11:46:05 +0100 Subject: call graph In-Reply-To: <56C96D2C.9090002@gmail.com> References: <56C96D2C.9090002@gmail.com> Message-ID: Thank you all specially mulyadi!!! I installed Egypt. It works fine. On Sun, Feb 21, 2016 at 8:54 AM, Andreas Platschek wrote: > Hi, > > On 2016-02-20 19:24, Mulyadi Santosa wrote: > > > > > > On Sat, Feb 20, 2016 at 5:08 PM, masoud hematpour > > wrote: > > > > > > Hello all, > > > > I need to create call graph of memory management. Is there any tool. > > I found "cflow" but the output is not good enough. Can anyone help > > me in preparing? > > or I should prepare manually. > > > > > > Thank you > > > > Hi... > > > > Have you check CodeViz? > > http://www.csn.ul.ie/~mel/projects/codeviz/ > > > > > I just looked at codeviz 2 weeks ago, and I would recommend to use the > "alternative method" with ncc > (http://students.ceid.upatras.gr/~sxanth/ncc/) as it is a lot simpler to > set it up (no need for a patched > version of gcc, etc.) and it is able to traverse function pointers. > > thx! > andi > > > also check this blog entry: > > http://deferred.io/2015/10/27/visualizing-linux-kernel-call-graphs.html > > > > One advice: try to be more specific when generating call graph i.e > > graph of page in. Other wise, you might find yourself generating too > > complex graph > > > > > > > > > > -- > > regards, > > > > Mulyadi Santosa > > Freelance Linux trainer and consultant > > > > blog: the-hydra.blogspot.com > > training: mulyaditraining.blogspot.com > > > > > > > > _______________________________________________ > > Kernelnewbies mailing list > > Kernelnewbies at kernelnewbies.org > > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160221/b3dfb630/attachment.html From mulyadi.santosa at gmail.com Sun Feb 21 10:27:48 2016 From: mulyadi.santosa at gmail.com (Mulyadi Santosa) Date: Sun, 21 Feb 2016 22:27:48 +0700 Subject: call graph In-Reply-To: References: <56C96D2C.9090002@gmail.com> Message-ID: On Sun, Feb 21, 2016 at 5:46 PM, masoud hematpour wrote: > Thank you all specially mulyadi!!! > I installed Egypt. It works fine. > > On Sun, Feb 21, 2016 at 8:54 AM, Andreas Platschek < > andi.platschek at gmail.com> wrote: > >> Hi, >> >> On 2016-02-20 19:24, Mulyadi Santosa wrote: >> > >> > >> > On Sat, Feb 20, 2016 at 5:08 PM, masoud hematpour > > > wrote: >> > >> > >> > Hello all, >> > >> > I need to create call graph of memory management. Is there any tool. >> > I found "cflow" but the output is not good enough. Can anyone help >> > me in preparing? >> > or I should prepare manually. >> > >> > >> > Thank you >> > >> > Hi... >> > >> > Have you check CodeViz? >> > http://www.csn.ul.ie/~mel/projects/codeviz/ >> > >> > >> I just looked at codeviz 2 weeks ago, and I would recommend to use the >> "alternative method" with ncc >> (http://students.ceid.upatras.gr/~sxanth/ncc/) as it is a lot simpler to >> set it up (no need for a patched >> version of gcc, etc.) and it is able to traverse function pointers. >> >> thx! >> andi >> >> > also check this blog entry: >> > http://deferred.io/2015/10/27/visualizing-linux-kernel-call-graphs.html >> > >> > One advice: try to be more specific when generating call graph i.e >> > graph of page in. Other wise, you might find yourself generating too >> > complex graph >> > >> > >> > >> > >> > -- >> > regards, >> > >> > Mulyadi Santosa >> > Freelance Linux trainer and consultant >> > >> > blog: the-hydra.blogspot.com >> > training: mulyaditraining.blogspot.com >> > >> > >> > >> > _______________________________________________ >> > Kernelnewbies mailing list >> > Kernelnewbies at kernelnewbies.org >> > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies >> >> >> _______________________________________________ >> Kernelnewbies mailing list >> Kernelnewbies at kernelnewbies.org >> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies >> > > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > You welcome Masoud. Oh and next time, please don't top post :) -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160221/aa3b3d48/attachment-0001.html From yuzibode at 126.com Sun Feb 21 11:29:54 2016 From: yuzibode at 126.com (YU Bo) Date: Mon, 22 Feb 2016 00:29:54 +0800 (CST) Subject: Why exist coding style issue in mm_types.h Message-ID: <533016df.21f9.15304aa7a61.Coremail.yuzibode@126.com> Hi, When read the source code of mm_types.h, i encounter _coding style_ code ,such like: http://lxr.free-electrons.com/source/include/linux/mm_types.h#L346 in comments. Why not try to fix it? Because it is trival? Actually, checkpatch.pl reports many errors and warnnings for it. Only can i fix the coding style issue in staging? Sorry for the noisy. -- Best Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160222/56f5e7eb/attachment.html From greg at kroah.com Sun Feb 21 13:27:39 2016 From: greg at kroah.com (Greg KH) Date: Sun, 21 Feb 2016 10:27:39 -0800 Subject: Why exist coding style issue in mm_types.h In-Reply-To: <533016df.21f9.15304aa7a61.Coremail.yuzibode@126.com> References: <533016df.21f9.15304aa7a61.Coremail.yuzibode@126.com> Message-ID: <20160221182739.GB29890@kroah.com> On Mon, Feb 22, 2016 at 12:29:54AM +0800, YU Bo wrote: > Hi, > When read the source code of mm_types.h, i encounter _coding style_ code > ,such like: > http://lxr.free-electrons.com/source/include/linux/mm_types.h#L346 in comments. > Why not try to fix it? Because it is trival? > Actually, checkpatch.pl reports many errors and warnnings for it. > Only can i fix the coding style issue in staging? Yes, stick to drivers/staging/* only for coding style fixes please. From ruben at mrbrklyn.com Sun Feb 21 17:34:38 2016 From: ruben at mrbrklyn.com (Ruben Safir) Date: Sun, 21 Feb 2016 17:34:38 -0500 Subject: can't read this Message-ID: <56CA3B7E.7070106@mrbrklyn.com> ASCII? --===============3901919624009551412== Content-Type: multipart/alternative; boundary="----=_Part_49324_945639701.1456072194657" ------=_Part_49324_945639701.1456072194657 Content-Type: text/plain; charset=GBK Content-Transfer-Encoding: base64 SGksCiAgV2hlbiAgcmVhZCB0aGUgc291cmNlIGNvZGUgb2YgbW1fdHlwZXMuaCwgaSBlbmNvdW50 ZXIgX2NvZGluZyBzdHlsZV8gY29kZSAsc3VjaCBsaWtlOgpodHRwOi8vbHhyLmZyZWUtZWxlY3Ry b25zLmNvbS9zb3VyY2UvaW5jbHVkZS9saW51eC9tbV90eXBlcy5oI0wzNDYgaW4gY29tbWVudHMu CldoeSBub3QgdHJ5IHRvIGZpeCBpdD8gQmVjYXVzZSBpdCBpcyB0cml2YWw/IApBY3R1YWxseSwg Y2hlY2twYXRjaC5wbCByZXBvcnRzIG1hbnkgZXJyb3JzIGFuZCB3YXJubmluZ3MgZm9yIGl0LgpP bmx5IGNhbiBpIGZpeCB0aGUgY29kaW5nIHN0eWxlIGlzc3VlIGluIHN0YWdpbmc/ClNvcnJ5IGZv ciB0aGUgbm9pc3kuIAoKCgoKLS0KQmVzdCBSZWdhcmRzCg== ------=_Part_49324_945639701.1456072194657 Content-Type: text/html; charset=GBK Content-Transfer-Encoding: base64 PGRpdiBzdHlsZT0ibGluZS1oZWlnaHQ6MS43O2NvbG9yOiMwMDAwMDA7Zm9udC1zaXplOjE0cHg7 Zm9udC1mYW1pbHk6QXJpYWwiPjxkaXY+SGksPC9kaXY+PGRpdj4mbmJzcDsgV2hlbiAmbmJzcDty ZWFkIHRoZSBzb3VyY2UgY29kZSBvZiBtbV90eXBlcy5oLCBpIGVuY291bnRlciBfY29kaW5nIHN0 eWxlXyBjb2RlICxzdWNoIGxpa2U6PC9kaXY+PGRpdj48YSBocmVmPSJodHRwOi8vbHhyLmZyZWUt ZWxlY3Ryb25zLmNvbS9zb3VyY2UvaW5jbHVkZS9saW51eC9tbV90eXBlcy5oI0wzNDYiIF9zcmM9 Imh0dHA6Ly9seHIuZnJlZS1lbGVjdHJvbnMuY29tL3NvdXJjZS9pbmNsdWRlL2xpbnV4L21tX3R5 cGVzLmgjTDM0NiIgc3R5bGU9ImxpbmUtaGVpZ2h0OiAxLjc7Ij5odHRwOi8vbHhyLmZyZWUtZWxl Y3Ryb25zLmNvbS9zb3VyY2UvaW5jbHVkZS9saW51eC9tbV90eXBlcy5oI0wzNDY8L2E+Jm5ic3A7 aW4gY29tbWVudHMuPC9kaXY+PGRpdj5XaHkgbm90IHRyeSB0byBmaXggaXQ/IEJlY2F1c2UgaXQg aXMgdHJpdmFsPyZuYnNwOzwvZGl2PjxkaXY+QWN0dWFsbHksIGNoZWNrcGF0Y2gucGwgcmVwb3J0 cyBtYW55IGVycm9ycyBhbmQgd2Fybm5pbmdzIGZvciBpdC48L2Rpdj48ZGl2Pk9ubHkgY2FuIGkg Zml4IHRoZSBjb2Rpbmcgc3R5bGUgaXNzdWUgaW4gc3RhZ2luZz88L2Rpdj48ZGl2PlNvcnJ5IGZv ciB0aGUgbm9pc3kuJm5ic3A7PC9kaXY+PGRpdj48YnI+PC9kaXY+PGRpdj48YnI+PC9kaXY+PGRp diBzdHlsZT0icG9zaXRpb246cmVsYXRpdmU7em9vbToxIj4tLTxicj5CZXN0IFJlZ2FyZHM8YnI+ PGRpdiBzdHlsZT0iY2xlYXI6Ym90aCI+PC9kaXY+PC9kaXY+PC9kaXY+ ------=_Part_49324_945639701.1456072194657-- --===============3901919624009551412== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kernelnewbies mailing list Kernelnewbies at kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies --===============3901919624009551412==-- -- So many immigrant groups have swept through our town that Brooklyn, like Atlantis, reaches mythological proportions in the mind of the world - RI Safir 1998 http://www.mrbrklyn.com DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002 http://www.nylxs.com - Leadership Development in Free Software http://www2.mrbrklyn.com/resources - Unpublished Archive http://www.coinhangout.com - coins! http://www.brooklyn-living.com Being so tracked is for FARM ANIMALS and and extermination camps, but incompatible with living as a free human being. -RI Safir 2013 From aruna.hewapathirane at gmail.com Sun Feb 21 20:03:30 2016 From: aruna.hewapathirane at gmail.com (Aruna Hewapathirane) Date: Sun, 21 Feb 2016 20:03:30 -0500 Subject: can't read this In-Reply-To: <56CA3B7E.7070106@mrbrklyn.com> References: <56CA3B7E.7070106@mrbrklyn.com> Message-ID: >> On Sun, Feb 21, 2016 at 5:34 PM, Ruben Safir wrote: >> ASCII? It is base64 encoding, if you look at the header it says Content-Transfer-Encoding: base64. Please cut and paste the 'content' into this https://www.base64decode.org/ and click decode. The original message was from YU Bo and from the header you can see Content-Type: text/plain; charset=GBK. charset=GBK is GBK is an extension of the GB2312 character set for simplified Chinese characters, used in the People's Republic of China. When decoded it shows: --------------------------------------------------------------------------------------------------------------------------------- Hi, When read the source code of mm_types.h, i encounter _coding style_ code ,such like: http://lxr.free-electrons.com/source/include/linux/mm_types.h#L346 in comments. Why not try to fix it? Because it is trival? Actually, checkpatch.pl reports many errors and warnnings for it. Only can i fix the coding style issue in staging? Sorry for the noisy. --------------------------------------------------------------------------------------------------------------------------------- Hope that helps :) Aruna >> --===============3901919624009551412== >> Content-Type: multipart/alternative; >> boundary="----=_Part_49324_945639701.1456072194657" >> >>------=_Part_49324_945639701.1456072194657 >> Content-Type: text/plain; charset=GBK >> Content-Transfer-Encoding: base64 > > > SGksCiAgV2hlbiAgcmVhZCB0aGUgc291cmNlIGNvZGUgb2YgbW1fdHlwZXMuaCwgaSBlbmNvdW50 > ZXIgX2NvZGluZyBzdHlsZV8gY29kZSAsc3VjaCBsaWtlOgpodHRwOi8vbHhyLmZyZWUtZWxlY3Ry > b25zLmNvbS9zb3VyY2UvaW5jbHVkZS9saW51eC9tbV90eXBlcy5oI0wzNDYgaW4gY29tbWVudHMu > CldoeSBub3QgdHJ5IHRvIGZpeCBpdD8gQmVjYXVzZSBpdCBpcyB0cml2YWw/IApBY3R1YWxseSwg > Y2hlY2twYXRjaC5wbCByZXBvcnRzIG1hbnkgZXJyb3JzIGFuZCB3YXJubmluZ3MgZm9yIGl0LgpP > bmx5IGNhbiBpIGZpeCB0aGUgY29kaW5nIHN0eWxlIGlzc3VlIGluIHN0YWdpbmc/ClNvcnJ5IGZv > ciB0aGUgbm9pc3kuIAoKCgoKLS0KQmVzdCBSZWdhcmRzCg== > ------=_Part_49324_945639701.1456072194657 > Content-Type: text/html; charset=GBK > Content-Transfer-Encoding: base64 > > PGRpdiBzdHlsZT0ibGluZS1oZWlnaHQ6MS43O2NvbG9yOiMwMDAwMDA7Zm9udC1zaXplOjE0cHg7 > Zm9udC1mYW1pbHk6QXJpYWwiPjxkaXY+SGksPC9kaXY+PGRpdj4mbmJzcDsgV2hlbiAmbmJzcDty > ZWFkIHRoZSBzb3VyY2UgY29kZSBvZiBtbV90eXBlcy5oLCBpIGVuY291bnRlciBfY29kaW5nIHN0 > eWxlXyBjb2RlICxzdWNoIGxpa2U6PC9kaXY+PGRpdj48YSBocmVmPSJodHRwOi8vbHhyLmZyZWUt > ZWxlY3Ryb25zLmNvbS9zb3VyY2UvaW5jbHVkZS9saW51eC9tbV90eXBlcy5oI0wzNDYiIF9zcmM9 > Imh0dHA6Ly9seHIuZnJlZS1lbGVjdHJvbnMuY29tL3NvdXJjZS9pbmNsdWRlL2xpbnV4L21tX3R5 > cGVzLmgjTDM0NiIgc3R5bGU9ImxpbmUtaGVpZ2h0OiAxLjc7Ij5odHRwOi8vbHhyLmZyZWUtZWxl > Y3Ryb25zLmNvbS9zb3VyY2UvaW5jbHVkZS9saW51eC9tbV90eXBlcy5oI0wzNDY8L2E+Jm5ic3A7 > aW4gY29tbWVudHMuPC9kaXY+PGRpdj5XaHkgbm90IHRyeSB0byBmaXggaXQ/IEJlY2F1c2UgaXQg > aXMgdHJpdmFsPyZuYnNwOzwvZGl2PjxkaXY+QWN0dWFsbHksIGNoZWNrcGF0Y2gucGwgcmVwb3J0 > cyBtYW55IGVycm9ycyBhbmQgd2Fybm5pbmdzIGZvciBpdC48L2Rpdj48ZGl2Pk9ubHkgY2FuIGkg > Zml4IHRoZSBjb2Rpbmcgc3R5bGUgaXNzdWUgaW4gc3RhZ2luZz88L2Rpdj48ZGl2PlNvcnJ5IGZv > ciB0aGUgbm9pc3kuJm5ic3A7PC9kaXY+PGRpdj48YnI+PC9kaXY+PGRpdj48YnI+PC9kaXY+PGRp > diBzdHlsZT0icG9zaXRpb246cmVsYXRpdmU7em9vbToxIj4tLTxicj5CZXN0IFJlZ2FyZHM8YnI+ > PGRpdiBzdHlsZT0iY2xlYXI6Ym90aCI+PC9kaXY+PC9kaXY+PC9kaXY+ > ------=_Part_49324_945639701.1456072194657-- > > > > --===============3901919624009551412== > Content-Type: text/plain; charset="us-ascii" > MIME-Version: 1.0 > Content-Transfer-Encoding: 7bit > Content-Disposition: inline > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > --===============3901919624009551412==-- > -- > So many immigrant groups have swept through our town > that Brooklyn, like Atlantis, reaches mythological > proportions in the mind of the world - RI Safir 1998 > http://www.mrbrklyn.com > > DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002 > http://www.nylxs.com - Leadership Development in Free Software > http://www2.mrbrklyn.com/resources - Unpublished Archive > http://www.coinhangout.com - coins! > http://www.brooklyn-living.com > > Being so tracked is for FARM ANIMALS and and extermination camps, > but incompatible with living as a free human being. -RI Safir 2013 > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160221/66d17f08/attachment.html From Valdis.Kletnieks at vt.edu Sun Feb 21 21:30:40 2016 From: Valdis.Kletnieks at vt.edu (Valdis.Kletnieks at vt.edu) Date: Sun, 21 Feb 2016 21:30:40 -0500 Subject: can't read this In-Reply-To: <56CA3B7E.7070106@mrbrklyn.com> References: <56CA3B7E.7070106@mrbrklyn.com> Message-ID: <186563.1456108240@turing-police.cc.vt.edu> On Sun, 21 Feb 2016 17:34:38 -0500, Ruben Safir said: > > ASCII? No. > Content-Type: text/plain; charset=GBK > Content-Transfer-Encoding: base64 It claims to be some mostly-nonstandard variety of Chinese. https://en.wikipedia.org/wiki/GBK -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 848 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160221/a7d36e71/attachment.bin From yuzibode at 126.com Sun Feb 21 21:52:46 2016 From: yuzibode at 126.com (YU Bo) Date: Mon, 22 Feb 2016 10:52:46 +0800 (CST) Subject: can't read this In-Reply-To: <186563.1456108240@turing-police.cc.vt.edu> References: <56CA3B7E.7070106@mrbrklyn.com> <186563.1456108240@turing-police.cc.vt.edu> Message-ID: Hi, At 2016-02-22 10:30:40, Valdis.Kletnieks at vt.edu wrote: >On Sun, 21 Feb 2016 17:34:38 -0500, Ruben Safir said: >> > ASCII? > >No. > >> Content-Type: text/plain; charset=GBK >> Content-Transfer-Encoding: base64 > >It claims to be some mostly-nonstandard variety of Chinese. > >https://en.wikipedia.org/wiki/GBK I will configure my email-client. Sorry for the noisy cause from me. -- Best Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160222/80ca5067/attachment.html From sunitad100 at gmail.com Mon Feb 22 00:24:54 2016 From: sunitad100 at gmail.com (SUNITA) Date: Mon, 22 Feb 2016 10:54:54 +0530 Subject: Project Idea.. Message-ID: Respected Sir/Madam, I am trying to study the effect of Scheduler Policies on Energy Consumption of Portable Device. This will be achieved by modifying the current Completely Fair Scheduler by changing the range of nice values from 40 to 100 and adding a new scheduing policy. CFS uses SCHED_RR, SCHED_FCFS, SCHED_OTHER, SCHED_BATCH Policy for scheduling any process. The idea is to insert a new scheduling policy by modifying the header files. Can this be a good topic to carry out research.I welcome any other idea related Linux Kernel CFS. Regards, SUNIITA From yuzibode at 126.com Mon Feb 22 00:05:29 2016 From: yuzibode at 126.com (YU Bo) Date: Mon, 22 Feb 2016 13:05:29 +0800 (CST) Subject: Why exist coding style issue in mm_types.h In-Reply-To: <20160221182739.GB29890@kroah.com> References: <533016df.21f9.15304aa7a61.Coremail.yuzibode@126.com> <20160221182739.GB29890@kroah.com> Message-ID: <5dfbf723.561d.153075e3acb.Coremail.yuzibode@126.com> Hi, At 2016-02-22 02:27:39, "Greg KH" wrote: >On Mon, Feb 22, 2016 at 12:29:54AM +0800, YU Bo wrote: >> Hi, >> When read the source code of mm_types.h, i encounter _coding style_ code >> ,such like: >> http://lxr.free-electrons.com/source/include/linux/mm_types.h#L346 in comments. >> Why not try to fix it? Because it is trival? >> Actually, checkpatch.pl reports many errors and warnnings for it. >> Only can i fix the coding style issue in staging? > >Yes, stick to drivers/staging/* only for coding style fixes please. > Thanks a lot! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160222/acd2566f/attachment.html From mulyadi.santosa at gmail.com Mon Feb 22 00:45:06 2016 From: mulyadi.santosa at gmail.com (Mulyadi Santosa) Date: Mon, 22 Feb 2016 12:45:06 +0700 Subject: Project Idea.. In-Reply-To: References: Message-ID: On Mon, Feb 22, 2016 at 12:24 PM, SUNITA wrote: > Respected Sir/Madam, > I am trying to study the effect of Scheduler Policies on Energy > Consumption of Portable Device. > > This will be achieved by modifying the current Completely Fair > Scheduler by changing the range of nice values from 40 to 100 and > adding a new scheduing policy. > CFS uses SCHED_RR, SCHED_FCFS, SCHED_OTHER, SCHED_BATCH Policy for > scheduling any process. The idea is to insert a new scheduling policy > by modifying the header files. > > Can this be a good topic to carry out research.I welcome any other > idea related Linux Kernel CFS. > > Regards, > SUNIITA > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > Hi Suniita Sounds challenging. It might be good topic. Just make sure you understand how to measure power consumption and prepare various scenario of load simulation to mimic real power consumption pattern. -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com This email has been sent from a virus-free computer protected by Avast. www.avast.com <#DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160222/0e96cce5/attachment.html From anilcoll90 at gmail.com Mon Feb 22 00:56:31 2016 From: anilcoll90 at gmail.com (Anil Nair) Date: Mon, 22 Feb 2016 11:26:31 +0530 Subject: Books Regarding Linux Kernel Message-ID: Hi, Can anyone suggest any good book for understanding the Linux Kernel? Are these books enough for understanding workings of Linux Kernel? 1.Linux Kernel in a Nutshell 2.Linux Device Drivers, Third Edition 3.Linux Kernel Development (3rd Edition) -- -- Regards, Anil Nair From klshiva4a4 at gmail.com Mon Feb 22 01:00:01 2016 From: klshiva4a4 at gmail.com (Shiva Shankar) Date: Mon, 22 Feb 2016 11:30:01 +0530 Subject: Books Regarding Linux Kernel In-Reply-To: References: Message-ID: Hi Anil, Listed books are enough to start programming. You can also refer to Professional Linux Kernel Architecture Book by Wolfgang Mauerer Thanks On Mon, Feb 22, 2016 at 11:26 AM, Anil Nair wrote: > Hi, > > Can anyone suggest any good book for understanding the Linux Kernel? > > Are these books enough for understanding workings of Linux Kernel? > > 1.Linux Kernel in a Nutshell > 2.Linux Device Drivers, Third Edition > 3.Linux Kernel Development (3rd Edition) > > > -- > -- > Regards, > Anil Nair > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160222/7c4ad69c/attachment.html From kennethadammiller at gmail.com Mon Feb 22 01:00:59 2016 From: kennethadammiller at gmail.com (Kenneth Adam Miller) Date: Mon, 22 Feb 2016 01:00:59 -0500 Subject: Books Regarding Linux Kernel In-Reply-To: References: Message-ID: Those are the popular three, but the documentation provided by kernel authors themselves as well as source code is also expected. Lastly, semantics of the machine are often a required read. The intel manual might be something that belongs on your list, if you want to truly understand. But no book is really enough to completely understand the linux kernel. Those just help you get started. On Mon, Feb 22, 2016 at 12:56 AM, Anil Nair wrote: > Hi, > > Can anyone suggest any good book for understanding the Linux Kernel? > > Are these books enough for understanding workings of Linux Kernel? > > 1.Linux Kernel in a Nutshell > 2.Linux Device Drivers, Third Edition > 3.Linux Kernel Development (3rd Edition) > > > -- > -- > Regards, > Anil Nair > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160222/ccf06c25/attachment.html From sanjeevsharmaengg at gmail.com Mon Feb 22 01:02:05 2016 From: sanjeevsharmaengg at gmail.com (sanjeev sharma) Date: Mon, 22 Feb 2016 11:32:05 +0530 Subject: Books Regarding Linux Kernel In-Reply-To: References: Message-ID: Hello, Please don't forget to read Linux Kernel by Robert Love.It is very good for beginner. Regards Sanjeev Sharma On Mon, Feb 22, 2016 at 11:30 AM, Shiva Shankar wrote: > Hi Anil, > Listed books are enough to start programming. > > You can also refer to > Professional Linux Kernel Architecture > Book by Wolfgang Mauerer > > Thanks > > > On Mon, Feb 22, 2016 at 11:26 AM, Anil Nair wrote: > >> Hi, >> >> Can anyone suggest any good book for understanding the Linux Kernel? >> >> Are these books enough for understanding workings of Linux Kernel? >> >> 1.Linux Kernel in a Nutshell >> 2.Linux Device Drivers, Third Edition >> 3.Linux Kernel Development (3rd Edition) >> >> >> -- >> -- >> Regards, >> Anil Nair >> >> _______________________________________________ >> Kernelnewbies mailing list >> Kernelnewbies at kernelnewbies.org >> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies >> > > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160222/5b805d66/attachment-0001.html From anilcoll90 at gmail.com Mon Feb 22 01:05:39 2016 From: anilcoll90 at gmail.com (Anil Nair) Date: Mon, 22 Feb 2016 11:35:39 +0530 Subject: Books Regarding Linux Kernel In-Reply-To: References: Message-ID: Hi, On Mon, Feb 22, 2016 at 11:32 AM, sanjeev sharma wrote: > Hello, > > Please don't forget to read Linux Kernel by Robert Love.It is very good for > beginner. > > Regards > Sanjeev Sharma > > On Mon, Feb 22, 2016 at 11:30 AM, Shiva Shankar > wrote: >> >> Hi Anil, >> Listed books are enough to start programming. >> >> You can also refer to >> Professional Linux Kernel Architecture >> Book by Wolfgang Mauerer >> >> Thanks >> >> >> On Mon, Feb 22, 2016 at 11:26 AM, Anil Nair wrote: >>> >>> Hi, >>> >>> Can anyone suggest any good book for understanding the Linux Kernel? >>> >>> Are these books enough for understanding workings of Linux Kernel? >>> >>> 1.Linux Kernel in a Nutshell >>> 2.Linux Device Drivers, Third Edition >>> 3.Linux Kernel Development (3rd Edition) >>> >>> >>> -- >>> -- >>> Regards, >>> Anil Nair >>> >>> _______________________________________________ >>> Kernelnewbies mailing list >>> Kernelnewbies at kernelnewbies.org >>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies >> >> >> >> _______________________________________________ >> Kernelnewbies mailing list >> Kernelnewbies at kernelnewbies.org >> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies >> > Thanks Guys for the help. :) -- -- Regards, Anil Nair From subodhtechno at gmail.com Mon Feb 22 01:51:46 2016 From: subodhtechno at gmail.com (subodh sawrav) Date: Mon, 22 Feb 2016 12:21:46 +0530 Subject: Books Regarding Linux Kernel In-Reply-To: References: Message-ID: My recommendation will be to start with "Linux Kernel Development" by Robert Love. It's the best book to start with. Regards, Subodh On Mon, Feb 22, 2016 at 11:35 AM, Anil Nair wrote: > Hi, > > On Mon, Feb 22, 2016 at 11:32 AM, sanjeev sharma > wrote: > > Hello, > > > > Please don't forget to read Linux Kernel by Robert Love.It is very good > for > > beginner. > > > > Regards > > Sanjeev Sharma > > > > On Mon, Feb 22, 2016 at 11:30 AM, Shiva Shankar > > wrote: > >> > >> Hi Anil, > >> Listed books are enough to start programming. > >> > >> You can also refer to > >> Professional Linux Kernel Architecture > >> Book by Wolfgang Mauerer > >> > >> Thanks > >> > >> > >> On Mon, Feb 22, 2016 at 11:26 AM, Anil Nair > wrote: > >>> > >>> Hi, > >>> > >>> Can anyone suggest any good book for understanding the Linux Kernel? > >>> > >>> Are these books enough for understanding workings of Linux Kernel? > >>> > >>> 1.Linux Kernel in a Nutshell > >>> 2.Linux Device Drivers, Third Edition > >>> 3.Linux Kernel Development (3rd Edition) > >>> > >>> > >>> -- > >>> -- > >>> Regards, > >>> Anil Nair > >>> > >>> _______________________________________________ > >>> Kernelnewbies mailing list > >>> Kernelnewbies at kernelnewbies.org > >>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > >> > >> > >> > >> _______________________________________________ > >> Kernelnewbies mailing list > >> Kernelnewbies at kernelnewbies.org > >> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > >> > > > > Thanks Guys for the help. :) > > -- > -- > Regards, > Anil Nair > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160222/4a12516d/attachment.html From mbobrowski at mbobrowski.org Mon Feb 22 01:53:33 2016 From: mbobrowski at mbobrowski.org (Matthew Bobrowski) Date: Mon, 22 Feb 2016 17:53:33 +1100 Subject: Books Regarding Linux Kernel In-Reply-To: References: Message-ID: Completely agree with Kenneth. Best of luck! -- Kind regards, Matthew Bobrowski On Mon, Feb 22, 2016 at 5:05 PM, Anil Nair wrote: > Hi, > > On Mon, Feb 22, 2016 at 11:32 AM, sanjeev sharma > wrote: >> Hello, >> >> Please don't forget to read Linux Kernel by Robert Love.It is very good for >> beginner. >> >> Regards >> Sanjeev Sharma >> >> On Mon, Feb 22, 2016 at 11:30 AM, Shiva Shankar >> wrote: >>> >>> Hi Anil, >>> Listed books are enough to start programming. >>> >>> You can also refer to >>> Professional Linux Kernel Architecture >>> Book by Wolfgang Mauerer >>> >>> Thanks >>> >>> >>> On Mon, Feb 22, 2016 at 11:26 AM, Anil Nair wrote: >>>> >>>> Hi, >>>> >>>> Can anyone suggest any good book for understanding the Linux Kernel? >>>> >>>> Are these books enough for understanding workings of Linux Kernel? >>>> >>>> 1.Linux Kernel in a Nutshell >>>> 2.Linux Device Drivers, Third Edition >>>> 3.Linux Kernel Development (3rd Edition) >>>> >>>> >>>> -- >>>> -- >>>> Regards, >>>> Anil Nair >>>> >>>> _______________________________________________ >>>> Kernelnewbies mailing list >>>> Kernelnewbies at kernelnewbies.org >>>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies >>> >>> >>> >>> _______________________________________________ >>> Kernelnewbies mailing list >>> Kernelnewbies at kernelnewbies.org >>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies >>> >> > > Thanks Guys for the help. :) > > -- > -- > Regards, > Anil Nair > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies From danielhilst at gmail.com Mon Feb 22 09:49:51 2016 From: danielhilst at gmail.com (Daniel.) Date: Mon, 22 Feb 2016 11:49:51 -0300 Subject: Books Regarding Linux Kernel In-Reply-To: References: Message-ID: There is Understanding the Linux Kernel, Daniel P. Bovet, Marco Cesati LKD by Love is a really good book, I love it! LDD3 can be found at http://www.makelinux.net/ldd3/ I suggest the documentation from the source too: https://www.kernel.org/doc/Documentation/ Best regards and good reading :) 2016-02-22 3:53 GMT-03:00 Matthew Bobrowski : > Completely agree with Kenneth. > > Best of luck! > > -- > > Kind regards, > Matthew Bobrowski > > > On Mon, Feb 22, 2016 at 5:05 PM, Anil Nair wrote: >> Hi, >> >> On Mon, Feb 22, 2016 at 11:32 AM, sanjeev sharma >> wrote: >>> Hello, >>> >>> Please don't forget to read Linux Kernel by Robert Love.It is very good for >>> beginner. >>> >>> Regards >>> Sanjeev Sharma >>> >>> On Mon, Feb 22, 2016 at 11:30 AM, Shiva Shankar >>> wrote: >>>> >>>> Hi Anil, >>>> Listed books are enough to start programming. >>>> >>>> You can also refer to >>>> Professional Linux Kernel Architecture >>>> Book by Wolfgang Mauerer >>>> >>>> Thanks >>>> >>>> >>>> On Mon, Feb 22, 2016 at 11:26 AM, Anil Nair wrote: >>>>> >>>>> Hi, >>>>> >>>>> Can anyone suggest any good book for understanding the Linux Kernel? >>>>> >>>>> Are these books enough for understanding workings of Linux Kernel? >>>>> >>>>> 1.Linux Kernel in a Nutshell >>>>> 2.Linux Device Drivers, Third Edition >>>>> 3.Linux Kernel Development (3rd Edition) >>>>> >>>>> >>>>> -- >>>>> -- >>>>> Regards, >>>>> Anil Nair >>>>> >>>>> _______________________________________________ >>>>> Kernelnewbies mailing list >>>>> Kernelnewbies at kernelnewbies.org >>>>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies >>>> >>>> >>>> >>>> _______________________________________________ >>>> Kernelnewbies mailing list >>>> Kernelnewbies at kernelnewbies.org >>>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies >>>> >>> >> >> Thanks Guys for the help. :) >> >> -- >> -- >> Regards, >> Anil Nair >> >> _______________________________________________ >> Kernelnewbies mailing list >> Kernelnewbies at kernelnewbies.org >> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies -- "Do or do not. There is no try" Yoda Master From sriraamlinux at gmail.com Mon Feb 22 10:15:34 2016 From: sriraamlinux at gmail.com (Sriraam VG) Date: Mon, 22 Feb 2016 20:45:34 +0530 Subject: Kernelnewbies Digest, Vol 63, Issue 37 In-Reply-To: References: Message-ID: Can someone suggest me a book on how to start contributing for linux kernel or any tutorial videos or any leads ? Thanks and regards Sriraam VG On Mon, Feb 22, 2016 at 11:32 AM, wrote: > 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:Re: Why exist coding style issue in mm_types.h (YU Bo) > 2. Re: Project Idea.. (Mulyadi Santosa) > 3. Books Regarding Linux Kernel (Anil Nair) > 4. Re: Books Regarding Linux Kernel (Shiva Shankar) > 5. Re: Books Regarding Linux Kernel (Kenneth Adam Miller) > 6. Re: Books Regarding Linux Kernel (sanjeev sharma) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 22 Feb 2016 13:05:29 +0800 (CST) > From: "YU Bo" > Subject: Re:Re: Why exist coding style issue in mm_types.h > To: "Greg KH" > Cc: "kernelnewbies at kernelnewbies.org" > > Message-ID: <5dfbf723.561d.153075e3acb.Coremail.yuzibode at 126.com> > Content-Type: text/plain; charset="gbk" > > Hi, > At 2016-02-22 02:27:39, "Greg KH" wrote: >>On Mon, Feb 22, 2016 at 12:29:54AM +0800, YU Bo wrote: >>> Hi, >>> When read the source code of mm_types.h, i encounter _coding style_ code >>> ,such like: >>> http://lxr.free-electrons.com/source/include/linux/mm_types.h#L346 in comments. >>> Why not try to fix it? Because it is trival? >>> Actually, checkpatch.pl reports many errors and warnnings for it. >>> Only can i fix the coding style issue in staging? >> >>Yes, stick to drivers/staging/* only for coding style fixes please. > >> > Thanks a lot! > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160222/acd2566f/attachment-0001.html > > ------------------------------ > > Message: 2 > Date: Mon, 22 Feb 2016 12:45:06 +0700 > From: Mulyadi Santosa > Subject: Re: Project Idea.. > To: kernelnewbies > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > On Mon, Feb 22, 2016 at 12:24 PM, SUNITA wrote: > >> Respected Sir/Madam, >> I am trying to study the effect of Scheduler Policies on Energy >> Consumption of Portable Device. >> >> This will be achieved by modifying the current Completely Fair >> Scheduler by changing the range of nice values from 40 to 100 and >> adding a new scheduing policy. >> CFS uses SCHED_RR, SCHED_FCFS, SCHED_OTHER, SCHED_BATCH Policy for >> scheduling any process. The idea is to insert a new scheduling policy >> by modifying the header files. >> >> Can this be a good topic to carry out research.I welcome any other >> idea related Linux Kernel CFS. >> >> Regards, >> SUNIITA >> >> _______________________________________________ >> Kernelnewbies mailing list >> Kernelnewbies at kernelnewbies.org >> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies >> > > Hi Suniita > > Sounds challenging. > > It might be good topic. Just make sure you understand how to measure power > consumption and prepare various scenario of load simulation to mimic real > power consumption pattern. > > > -- > regards, > > Mulyadi Santosa > Freelance Linux trainer and consultant > > blog: the-hydra.blogspot.com > training: mulyaditraining.blogspot.com > > This email has been sent from a virus-free computer protected by Avast. > www.avast.com > <#DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2> > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160222/0e96cce5/attachment-0001.html > > ------------------------------ > > Message: 3 > Date: Mon, 22 Feb 2016 11:26:31 +0530 > From: Anil Nair > Subject: Books Regarding Linux Kernel > To: kernelnewbies at kernelnewbies.org > Message-ID: > > Content-Type: text/plain; charset=UTF-8 > > Hi, > > Can anyone suggest any good book for understanding the Linux Kernel? > > Are these books enough for understanding workings of Linux Kernel? > > 1.Linux Kernel in a Nutshell > 2.Linux Device Drivers, Third Edition > 3.Linux Kernel Development (3rd Edition) > > > -- > -- > Regards, > Anil Nair > > > > ------------------------------ > > Message: 4 > Date: Mon, 22 Feb 2016 11:30:01 +0530 > From: Shiva Shankar > Subject: Re: Books Regarding Linux Kernel > To: Anil Nair > Cc: kernelnewbies > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > Hi Anil, > Listed books are enough to start programming. > > You can also refer to > Professional Linux Kernel Architecture > Book by Wolfgang Mauerer > > Thanks > > > On Mon, Feb 22, 2016 at 11:26 AM, Anil Nair wrote: > >> Hi, >> >> Can anyone suggest any good book for understanding the Linux Kernel? >> >> Are these books enough for understanding workings of Linux Kernel? >> >> 1.Linux Kernel in a Nutshell >> 2.Linux Device Drivers, Third Edition >> 3.Linux Kernel Development (3rd Edition) >> >> >> -- >> -- >> Regards, >> Anil Nair >> >> _______________________________________________ >> Kernelnewbies mailing list >> Kernelnewbies at kernelnewbies.org >> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies >> > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160222/7c4ad69c/attachment-0001.html > > ------------------------------ > > Message: 5 > Date: Mon, 22 Feb 2016 01:00:59 -0500 > From: Kenneth Adam Miller > Subject: Re: Books Regarding Linux Kernel > To: Anil Nair > Cc: Kernelnewbies > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > Those are the popular three, but the documentation provided by kernel > authors themselves as well as source code is also expected. > > Lastly, semantics of the machine are often a required read. The intel > manual might be something that belongs on your list, if you want to truly > understand. > > But no book is really enough to completely understand the linux kernel. > Those just help you get started. > > On Mon, Feb 22, 2016 at 12:56 AM, Anil Nair wrote: > >> Hi, >> >> Can anyone suggest any good book for understanding the Linux Kernel? >> >> Are these books enough for understanding workings of Linux Kernel? >> >> 1.Linux Kernel in a Nutshell >> 2.Linux Device Drivers, Third Edition >> 3.Linux Kernel Development (3rd Edition) >> >> >> -- >> -- >> Regards, >> Anil Nair >> >> _______________________________________________ >> Kernelnewbies mailing list >> Kernelnewbies at kernelnewbies.org >> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies >> > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160222/ccf06c25/attachment-0001.html > > ------------------------------ > > Message: 6 > Date: Mon, 22 Feb 2016 11:32:05 +0530 > From: sanjeev sharma > Subject: Re: Books Regarding Linux Kernel > To: Shiva Shankar > Cc: Anil Nair , kernelnewbies > > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > Hello, > > Please don't forget to read Linux Kernel by Robert Love.It is very good for > beginner. > > Regards > Sanjeev Sharma > > On Mon, Feb 22, 2016 at 11:30 AM, Shiva Shankar > wrote: > >> Hi Anil, >> Listed books are enough to start programming. >> >> You can also refer to >> Professional Linux Kernel Architecture >> Book by Wolfgang Mauerer >> >> Thanks >> >> >> On Mon, Feb 22, 2016 at 11:26 AM, Anil Nair wrote: >> >>> Hi, >>> >>> Can anyone suggest any good book for understanding the Linux Kernel? >>> >>> Are these books enough for understanding workings of Linux Kernel? >>> >>> 1.Linux Kernel in a Nutshell >>> 2.Linux Device Drivers, Third Edition >>> 3.Linux Kernel Development (3rd Edition) >>> >>> >>> -- >>> -- >>> Regards, >>> Anil Nair >>> >>> _______________________________________________ >>> Kernelnewbies mailing list >>> Kernelnewbies at kernelnewbies.org >>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies >>> >> >> >> _______________________________________________ >> Kernelnewbies mailing list >> Kernelnewbies at kernelnewbies.org >> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies >> >> > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160222/5b805d66/attachment.html > > ------------------------------ > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > > End of Kernelnewbies Digest, Vol 63, Issue 37 > ********************************************* From aruna.hewapathirane at gmail.com Mon Feb 22 11:02:24 2016 From: aruna.hewapathirane at gmail.com (Aruna Hewapathirane) Date: Mon, 22 Feb 2016 11:02:24 -0500 Subject: Books Regarding Linux Kernel In-Reply-To: References: Message-ID: Hi Anil, The book 'Linux Programming Interface' by Michael Kerrisk who is the Linux man-pages maintainer is full of useful examples and the breadth and depth of its coverage is remarkable. When it comes to networking there is a book 'Linux Kernel Networking: Implementation and Theory' by Rami Rosen that is comprehensive and through. It helps immensely once you understand the 'subsystems' first. This will help: http://kernelnewbies.org/Documentation/Subsystems That being said if you truly want to 'understand' the kernel the best way is to start building your own and the best documentation I have found is the source itself :) Good luck ! Aruna On Mon, Feb 22, 2016 at 12:56 AM, Anil Nair wrote: > Hi, > > Can anyone suggest any good book for understanding the Linux Kernel? > > Are these books enough for understanding workings of Linux Kernel? > > 1.Linux Kernel in a Nutshell > 2.Linux Device Drivers, Third Edition > 3.Linux Kernel Development (3rd Edition) > > > -- > -- > Regards, > Anil Nair > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160222/b6eaf244/attachment.html From greg at kroah.com Mon Feb 22 11:18:43 2016 From: greg at kroah.com (Greg KH) Date: Mon, 22 Feb 2016 08:18:43 -0800 Subject: Project Idea.. In-Reply-To: References: Message-ID: <20160222161843.GA25683@kroah.com> On Mon, Feb 22, 2016 at 10:54:54AM +0530, SUNITA wrote: > Respected Sir/Madam, > I am trying to study the effect of Scheduler Policies on Energy > Consumption of Portable Device. There are lots of people currently working on this, and have been for many years. I know of at least 3 complete implementations at the moment (two of which ship in some Android phones), so I would suggest working with one of those groups to try to get their code merged into the Linux kernel. To create a 4th implementation would seem like a bit of a redundant effort. Search the archives of lwn.net for details about this if you are interested. good luck! greg k-h From john.chludzinski at vivaldi.net Mon Feb 22 17:02:24 2016 From: john.chludzinski at vivaldi.net (John Chludzinski) Date: Mon, 22 Feb 2016 17:02:24 -0500 Subject: Books Regarding Linux Kernel In-Reply-To: References: Message-ID: <7fa5f53671c9f4af7aa6b1de963f3102@mail.vivaldi.net> I'd say it's the best for beginners and intermediate level coders (i.e., software engineers). Robert Love's make the difficult understandable. ---John On 2016-02-22 01:02, sanjeev sharma wrote: > Hello, > > Please don't forget to read Linux Kernel by Robert Love.It is very > good for beginner. > > Regards > Sanjeev Sharma > > On Mon, Feb 22, 2016 at 11:30 AM, Shiva Shankar > wrote: > >> Hi Anil, >> Listed books are enough to start programming. >> >> You can also refer to >> >> Professional Linux Kernel Architecture Book by Wolfgang Mauerer >> >> Thanks >> >> On Mon, Feb 22, 2016 at 11:26 AM, Anil Nair >> wrote: >> >>> Hi, >>> >>> Can anyone suggest any good book for understanding the Linux >>> Kernel? >>> >>> Are these books enough for understanding workings of Linux Kernel? >>> >>> 1.Linux Kernel in a Nutshell >>> 2.Linux Device Drivers, Third Edition >>> 3.Linux Kernel Development (3rd Edition) >>> >>> -- >>> -- >>> Regards, >>> Anil Nair >>> >>> _______________________________________________ >>> Kernelnewbies mailing list >>> Kernelnewbies at kernelnewbies.org >>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies [1] >> >> _______________________________________________ >> Kernelnewbies mailing list >> Kernelnewbies at kernelnewbies.org >> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies [1] > > > > Links: > ------ > [1] http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies From narkewoody at gmail.com Tue Feb 23 09:35:55 2016 From: narkewoody at gmail.com (Woody Wu) Date: Tue, 23 Feb 2016 22:35:55 +0800 Subject: Porting to an S3C2416 failed with no console message Message-ID: Hi, I am trying to port 3.18 kernel to a S3C2416. Years ago, a guy helped me ported a 3.1.0 kernel to the same board, and the guy left and the kernel got too old. The guy also ported an u-boot as boot loader to load the 3.1.0 kernel. I had the source code of the ported u-boot and the 3.1.0 linux. Now, my problem is that my porting of 3.18 seems not working, I did not see any kernel message printed to the first SoC serial port as I expected. As long as I can get kernel message printed to the serial, I think I can step by step finish the whole porting work eventually. But now, there is no message and I have no other hardware debugging tools and knowledges, I felt I lost my way totally. I hope someone can give me some suggestions, clues to help me understand where to check and what's the possible causes. Since I found the old porting of the 3.1.0 is quit similar to SMDK2416, then I started my work from also the SMDK2416 board code in 3.18. Basically, I defined the machine-code to match that passed from u-boot, and copied the MACHINE-START definition section with removing of some not-immediately-needed stuff such as USB, NAND and HMSUI etc. I also enabled the S3C2410 serial driver and enabled the serial console supporting for the Samsung SoC. Of course, I had the kernel parameter of "console=ttySAC0", ttySAC0 is the Linux device name of the first UART port in the SoC. These are basically what I had done and I guess the SoC serial part between my board and SMDK2416 should be very similar and the kernel should at least be able to print it's first message then I should have chance to fix other differences. But there is no kernel message at all as I mentioned above. What should I check for the problem usually? Is there a checking list to go through? I hope you experts can give me some clues. Thanks in advance! Best Regards, woody -- Life is the only flaw in an otherwise perfect nonexistence -- Schopenhauer woody public key at http://subkeys.pgp.net:11371 (narkewoody at gmail.com) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160223/264a3682/attachment.html From sunitad100 at gmail.com Tue Feb 23 11:19:58 2016 From: sunitad100 at gmail.com (SUNITA) Date: Tue, 23 Feb 2016 21:49:58 +0530 Subject: Project Idea.. In-Reply-To: <20160222161843.GA25683@kroah.com> References: <20160222161843.GA25683@kroah.com> Message-ID: On 22 Feb 2016 21:48, "Greg KH" wrote: > On Mon, Feb 22, 2016 at 10:54:54AM +0530, SUNITA wrote: > > Respected Sir/Madam, > > I am trying to study the effect of Scheduler Policies on Energy > > Consumption of Portable Device. > > There are lots of people currently working on this, and have been for > many years. I know of at least 3 complete implementations at the > moment (two of which ship in some Android phones), so I would suggest > working with one of those groups to try to get their code merged into > the Linux kernel. To create a 4th implementation would seem like a bit > of a redundant effort. > > Search the archives of lwn.net for details about this if you are > interested. > > good luck! > > greg k-h > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160223/3b3b0d10/attachment.html From sunitad100 at gmail.com Tue Feb 23 11:20:33 2016 From: sunitad100 at gmail.com (SUNITA) Date: Tue, 23 Feb 2016 21:50:33 +0530 Subject: Fwd: Re: Project Idea.. In-Reply-To: References: Message-ID: ---------- Forwarded message ---------- From: "SUNITA" Date: 23 Feb 2016 17:23 Subject: Re: Project Idea.. To: "Mulyadi Santosa" Cc: Dear Mulyadi, Thank you for your reply. I m proceeding with the modification in CFS. Hope this will be useful research. Regards, Sunita On 2/22/16, Mulyadi Santosa wrote: > On Mon, Feb 22, 2016 at 12:24 PM, SUNITA wrote: > >> Respected Sir/Madam, >> I am trying to study the effect of Scheduler Policies on Energy >> Consumption of Portable Device. >> >> This will be achieved by modifying the current Completely Fair >> Scheduler by changing the range of nice values from 40 to 100 and >> adding a new scheduing policy. >> CFS uses SCHED_RR, SCHED_FCFS, SCHED_OTHER, SCHED_BATCH Policy for >> scheduling any process. The idea is to insert a new scheduling policy >> by modifying the header files. >> >> Can this be a good topic to carry out research.I welcome any other >> idea related Linux Kernel CFS. >> >> Regards, >> SUNIITA >> >> _______________________________________________ >> Kernelnewbies mailing list >> Kernelnewbies at kernelnewbies.org >> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies >> > > Hi Suniita > > Sounds challenging. > > It might be good topic. Just make sure you understand how to measure power > consumption and prepare various scenario of load simulation to mimic real > power consumption pattern. > > > -- > regards, > > Mulyadi Santosa > Freelance Linux trainer and consultant > > blog: the-hydra.blogspot.com > training: mulyaditraining.blogspot.com > > This email has been sent from a virus-free computer protected by Avast. > www.avast.com > <#DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160223/b28e0599/attachment.html From Valdis.Kletnieks at vt.edu Tue Feb 23 11:38:59 2016 From: Valdis.Kletnieks at vt.edu (Valdis Kletnieks) Date: Tue, 23 Feb 2016 11:38:59 -0500 Subject: Test e-mail, please ignore... Message-ID: <6389.1456245539@turing-police.cc.vt.edu> For some reason, I'm not seeing posts I send to the list. (Has somebody changed the list config, or is there something more subtle going on?) From newell.roger at gmail.com Tue Feb 23 11:52:57 2016 From: newell.roger at gmail.com (Roger H Newell) Date: Tue, 23 Feb 2016 13:22:57 -0330 Subject: Test e-mail, please ignore... In-Reply-To: <6389.1456245539@turing-police.cc.vt.edu> References: <6389.1456245539@turing-police.cc.vt.edu> Message-ID: On Tue, Feb 23, 2016 at 1:08 PM, Valdis Kletnieks wrote: > For some reason, I'm not seeing posts I send to the list. > (Has somebody changed the list config, or is there something more > subtle going on?) > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies I think it could be normal. Have you checked the archive to make sure your emails are really going out to the list ? I had a similar issue where I wasn't receiving emails from the list that I sent to it but they are in fact there when I check the archive. Some email software won't show the message twice because it already exists in your sent folder as is the case with gmail. From tapas.sarangi at gmail.com Tue Feb 23 14:41:50 2016 From: tapas.sarangi at gmail.com (Tapas Sarangi) Date: Tue, 23 Feb 2016 13:41:50 -0600 Subject: Kernel Panic in FIPS mode Message-ID: I am recompiling 3.18.27 on a platform derived from el6. FIPS mode is enabled by checking the following configs: CONFIG_CRYPTO_FIPS=y CONFIG_CRYPTO_TEST=y Following RH docs, initramfs was regenerated using dracut-fips (el6). I also generated hmac signed vmlinuz during the compilation. During boot, kernel panics with the following trace: kernel line has the arguments, 'fips=1 boot=/dev/sda1'. "end Kernel Panic - not syncing: Module crc32c_intel signature verification failed in FIPS mode" Some additional info: It seems under fips mode, initrd runs, './sbin/fips.sh' which then runs 'modprobe tcrypt'. I tried running modprobe tcrypt without the fips mode on the same kernel, but it fails with this message. FATAL: Error inserting tcrypt (/lib/modules/3.18.27-1.timbuktu/kernel/crypto/tcrypt.ko.gz): Unknown symbol in module, or unknown parameter (see dmesg) Looking at dmesg: [ 31.248054] sha256_ssse3: Using AVX optimized SHA-256 implementation [ 31.308174] sha512_ssse3: Using AVX optimized SHA-512 implementation [ 31.407674] alg: No test for crc32 (crc32-pclmul) [ 31.408410] alg: No test for crc32 (crc32-table) [ 31.409086] alg: hash: Failed to load transform for hmac(crc32): -2 [ 31.413155] alg: No test for fips(ansi_cprng) (fips_ansi_cprng) [ 31.440281] tcrypt: one or more tests failed! Now, one of these messages, [ 31.409086] alg: hash: Failed to load transform for hmac(crc32): -2 comes, most likely from : linux-3.18.27/crypto/tcrypt.c (L1498) case 110: ret += tcrypt_test("hmac(crc32)"); break; and also from linux-3.18.27/crypto/testmgr.c .alg = "hmac(crc32)", .test = alg_test_hash, .suite = { .hash = { .vecs = bfin_crc_tv_template, .count = BFIN_CRC_TEST_VECTORS } } Any suggestion on how to solve this problem would be appreciated. Please let me know if I can provide more info. I am ready to help on that. From greg at kroah.com Tue Feb 23 15:02:02 2016 From: greg at kroah.com (Greg KH) Date: Tue, 23 Feb 2016 12:02:02 -0800 Subject: Kernel Panic in FIPS mode In-Reply-To: References: Message-ID: <20160223200202.GA26480@kroah.com> On Tue, Feb 23, 2016 at 01:41:50PM -0600, Tapas Sarangi wrote: > I am recompiling 3.18.27 on a platform derived from el6. FIPS mode is > enabled by checking the following configs: > > CONFIG_CRYPTO_FIPS=y > CONFIG_CRYPTO_TEST=y If you are using a RHEL system, you need to contact Red Hat for support as that is what you are paying for. Their kernel is a very "odd" one. Also note that 3.18 is very old and obsolete as well, please use a "modern" kernel release, the community can't support old kernels like that. best of luck, greg k-h From kirotawa at gmail.com Tue Feb 23 15:02:37 2016 From: kirotawa at gmail.com (Leo Silva (a.k.a kirotawa)) Date: Tue, 23 Feb 2016 17:02:37 -0300 Subject: Kernel Panic in FIPS mode In-Reply-To: References: Message-ID: If it's a kernel provide by a company, such as RHEL or SUSE, I'd recommend to ask for them support/bugzilla. Regarding FIPS/fipsmode, it's a kind of certification that is done by these company with focus on specific hardware and Kernels, if just a bit is different on a crypto algorithm it'll probably fail, since test certification, fips, was not done using this 'new algorithm' as base. []'s On Tue, Feb 23, 2016 at 4:41 PM, Tapas Sarangi wrote: > I am recompiling 3.18.27 on a platform derived from el6. FIPS mode is > enabled by checking the following configs: > > CONFIG_CRYPTO_FIPS=y > CONFIG_CRYPTO_TEST=y > > Following RH docs, initramfs was regenerated using dracut-fips (el6). > I also generated hmac signed vmlinuz during the compilation. > > During boot, kernel panics with the following trace: > kernel line has the arguments, 'fips=1 boot=/dev/sda1'. > > > "end Kernel Panic - not syncing: Module crc32c_intel signature > verification failed in FIPS mode" > > Some additional info: > It seems under fips mode, initrd runs, './sbin/fips.sh' which then > runs 'modprobe tcrypt'. > > I tried running modprobe tcrypt without the fips mode on the same > kernel, but it fails with this message. > > FATAL: Error inserting tcrypt > (/lib/modules/3.18.27-1.timbuktu/kernel/crypto/tcrypt.ko.gz): Unknown > symbol in module, or unknown parameter (see dmesg) > > Looking at dmesg: > > [ 31.248054] sha256_ssse3: Using AVX optimized SHA-256 implementation > > [ 31.308174] sha512_ssse3: Using AVX optimized SHA-512 implementation > > [ 31.407674] alg: No test for crc32 (crc32-pclmul) > > [ 31.408410] alg: No test for crc32 (crc32-table) > > [ 31.409086] alg: hash: Failed to load transform for hmac(crc32): -2 > > [ 31.413155] alg: No test for fips(ansi_cprng) (fips_ansi_cprng) > > [ 31.440281] tcrypt: one or more tests failed! > > > Now, one of these messages, > > [ 31.409086] alg: hash: Failed to load transform for hmac(crc32): -2 > > comes, most likely from : > > > linux-3.18.27/crypto/tcrypt.c (L1498) > > case 110: > > ret += tcrypt_test("hmac(crc32)"); > > break; > > > and also from > > linux-3.18.27/crypto/testmgr.c > > .alg = "hmac(crc32)", > > .test = alg_test_hash, > > .suite = { > > .hash = { > > .vecs = bfin_crc_tv_template, > > .count = BFIN_CRC_TEST_VECTORS > > } > > } > > > Any suggestion on how to solve this problem would be appreciated. > Please let me know if I can provide more info. I am ready to help on > that. > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -- ---------------------------------------------- Le?nidas S. Barbosa (Kirotawa) blog: corecode.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160223/400c1952/attachment.html From tapas.sarangi at gmail.com Tue Feb 23 15:41:37 2016 From: tapas.sarangi at gmail.com (Tapas Sarangi) Date: Tue, 23 Feb 2016 14:41:37 -0600 Subject: Kernel Panic in FIPS mode In-Reply-To: <20160223200202.GA26480@kroah.com> References: <20160223200202.GA26480@kroah.com> Message-ID: <703D0F9C-C5DF-45DE-88AC-7C46C4499282@gmail.com> Thanks for the reply. I am using and compiling kernel from kernel.org. I believe 3.18.27 with patches is as new as in January of this year. Sent from my iPhone > On Feb 23, 2016, at 2:02 PM, Greg KH wrote: > >> On Tue, Feb 23, 2016 at 01:41:50PM -0600, Tapas Sarangi wrote: >> I am recompiling 3.18.27 on a platform derived from el6. FIPS mode is >> enabled by checking the following configs: >> >> CONFIG_CRYPTO_FIPS=y >> CONFIG_CRYPTO_TEST=y > > > > If you are using a RHEL system, you need to contact Red Hat for support > as that is what you are paying for. Their kernel is a very "odd" one. > > Also note that 3.18 is very old and obsolete as well, please use a > "modern" kernel release, the community can't support old kernels like > that. > > best of luck, > > greg k-h From greg at kroah.com Tue Feb 23 16:14:38 2016 From: greg at kroah.com (Greg KH) Date: Tue, 23 Feb 2016 13:14:38 -0800 Subject: Kernel Panic in FIPS mode In-Reply-To: <703D0F9C-C5DF-45DE-88AC-7C46C4499282@gmail.com> References: <20160223200202.GA26480@kroah.com> <703D0F9C-C5DF-45DE-88AC-7C46C4499282@gmail.com> Message-ID: <20160223211438.GA27854@kroah.com> On Tue, Feb 23, 2016 at 02:41:37PM -0600, Tapas Sarangi wrote: > Thanks for the reply. > I am using and compiling kernel from kernel.org. I believe 3.18.27 > with patches is as new as in January of this year. The 3.18 kernel was released in December of 2014, the .y patches on the end of that release are for people who for some reason or another are stuck with that kernel release, and are part of the longterm releases. The overall kernel is over a year old, please upgrade. greg k-h From tapas.sarangi at gmail.com Tue Feb 23 18:01:02 2016 From: tapas.sarangi at gmail.com (Tapas Sarangi) Date: Tue, 23 Feb 2016 17:01:02 -0600 Subject: Kernel Panic in FIPS mode In-Reply-To: <20160223211438.GA27854@kroah.com> References: <20160223200202.GA26480@kroah.com> <703D0F9C-C5DF-45DE-88AC-7C46C4499282@gmail.com> <20160223211438.GA27854@kroah.com> Message-ID: Thanks. I understand your point, but I am one of those people who simply can't do an upgrade to the LTS kernel. Again, I think this doesn't necessarily answer my question about FIPS and kernel panic. An additional note, older kernels (2.6.x) and its RH derivatives, works fine when started under FIPS mode. I am sure I am missing some basics when turning the OS to run under FIPS mode, which is why this email to the experts :-) On Tue, Feb 23, 2016 at 3:14 PM, Greg KH wrote: > On Tue, Feb 23, 2016 at 02:41:37PM -0600, Tapas Sarangi wrote: >> Thanks for the reply. >> I am using and compiling kernel from kernel.org. I believe 3.18.27 >> with patches is as new as in January of this year. > > The 3.18 kernel was released in December of 2014, the .y patches on the > end of that release are for people who for some reason or another are > stuck with that kernel release, and are part of the longterm releases. > > The overall kernel is over a year old, please upgrade. > > greg k-h From tapas.sarangi at gmail.com Tue Feb 23 18:02:56 2016 From: tapas.sarangi at gmail.com (Tapas Sarangi) Date: Tue, 23 Feb 2016 17:02:56 -0600 Subject: Kernel Panic in FIPS mode In-Reply-To: References: Message-ID: Thanks. I am taking the kernel from kernel.org not the one provided by Red Hat or any other OS. AFAIU, certification or module signatures are done during kernel compilation (by turning on MODULE_SIG*). On Tue, Feb 23, 2016 at 2:02 PM, Leo Silva (a.k.a kirotawa) wrote: > If it's a kernel provide by a company, such as RHEL or SUSE, I'd recommend > to ask for them support/bugzilla. > > Regarding FIPS/fipsmode, it's a kind of certification that is done by these > company with focus on specific hardware and Kernels, if just a bit is > different on a crypto algorithm it'll probably fail, since test > certification, fips, was not done using this 'new algorithm' as base. > > []'s > > On Tue, Feb 23, 2016 at 4:41 PM, Tapas Sarangi > wrote: >> >> I am recompiling 3.18.27 on a platform derived from el6. FIPS mode is >> enabled by checking the following configs: >> >> CONFIG_CRYPTO_FIPS=y >> CONFIG_CRYPTO_TEST=y >> >> Following RH docs, initramfs was regenerated using dracut-fips (el6). >> I also generated hmac signed vmlinuz during the compilation. >> >> During boot, kernel panics with the following trace: >> kernel line has the arguments, 'fips=1 boot=/dev/sda1'. >> >> >> "end Kernel Panic - not syncing: Module crc32c_intel signature >> verification failed in FIPS mode" >> >> Some additional info: >> It seems under fips mode, initrd runs, './sbin/fips.sh' which then >> runs 'modprobe tcrypt'. >> >> I tried running modprobe tcrypt without the fips mode on the same >> kernel, but it fails with this message. >> >> FATAL: Error inserting tcrypt >> (/lib/modules/3.18.27-1.timbuktu/kernel/crypto/tcrypt.ko.gz): Unknown >> symbol in module, or unknown parameter (see dmesg) >> >> Looking at dmesg: >> >> [ 31.248054] sha256_ssse3: Using AVX optimized SHA-256 implementation >> >> [ 31.308174] sha512_ssse3: Using AVX optimized SHA-512 implementation >> >> [ 31.407674] alg: No test for crc32 (crc32-pclmul) >> >> [ 31.408410] alg: No test for crc32 (crc32-table) >> >> [ 31.409086] alg: hash: Failed to load transform for hmac(crc32): -2 >> >> [ 31.413155] alg: No test for fips(ansi_cprng) (fips_ansi_cprng) >> >> [ 31.440281] tcrypt: one or more tests failed! >> >> >> Now, one of these messages, >> >> [ 31.409086] alg: hash: Failed to load transform for hmac(crc32): -2 >> >> comes, most likely from : >> >> >> linux-3.18.27/crypto/tcrypt.c (L1498) >> >> case 110: >> >> ret += tcrypt_test("hmac(crc32)"); >> >> break; >> >> >> and also from >> >> linux-3.18.27/crypto/testmgr.c >> >> .alg = "hmac(crc32)", >> >> .test = alg_test_hash, >> >> .suite = { >> >> .hash = { >> >> .vecs = bfin_crc_tv_template, >> >> .count = BFIN_CRC_TEST_VECTORS >> >> } >> >> } >> >> >> Any suggestion on how to solve this problem would be appreciated. >> Please let me know if I can provide more info. I am ready to help on >> that. >> >> _______________________________________________ >> Kernelnewbies mailing list >> Kernelnewbies at kernelnewbies.org >> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > > > > -- > > ---------------------------------------------- > Le?nidas S. Barbosa (Kirotawa) > blog: corecode.wordpress.com From rolland.santimano at gmail.com Tue Feb 23 23:11:59 2016 From: rolland.santimano at gmail.com (Rolland Santimano) Date: Wed, 24 Feb 2016 09:41:59 +0530 Subject: Partial (?) kernel crash dump ? Message-ID: I'm trying to save a crashdump on a DellFC630 with 128G of RAM, running Ubuntu 14.10, kernel 3.16.0-23-generic; used to host a bunch of KVM-style VMs. Since saving the full dump is taking forever & a day, I'm looking to save a partial dump -- maybe a few addr space regions only from the kernel VAS. Is this even possible ? Any other options ? Or am I missing something here ? -- Rolland From navych at 126.com Tue Feb 23 23:57:42 2016 From: navych at 126.com (Navy Cheng) Date: Wed, 24 Feb 2016 12:57:42 +0800 Subject: Is there a bug in dgnc.ko? Message-ID: <20160224045742.GA24012@debian> Hi, My kernel version is v4.4, and I have built drivers/staging/dgnc/dgnc.ko. I change to *dir*/drivers/staging/dgnc and do like this: sudo insmod ./dgnc.ko sudo lsmod | grep dgnc sudo rmmod ./dgnc sudo insmod ./dgnc.ko After I re-insmod the dgnc module, my laptop is breakdown. My OS is debian 8.0. Is there a bug in dgnc.ko or something wrong with my OS or kernel. If there is a bug, How can I find it? Thanks. From Valdis.Kletnieks at vt.edu Wed Feb 24 00:37:40 2016 From: Valdis.Kletnieks at vt.edu (Valdis.Kletnieks at vt.edu) Date: Wed, 24 Feb 2016 00:37:40 -0500 Subject: Is there a bug in dgnc.ko? In-Reply-To: <20160224045742.GA24012@debian> References: <20160224045742.GA24012@debian> Message-ID: <11119.1456292260@turing-police.cc.vt.edu> On Wed, 24 Feb 2016 12:57:42 +0800, Navy Cheng said: > Hi, > > My kernel version is v4.4, and I have built drivers/staging/dgnc/dgnc.ko. > I change to *dir*/drivers/staging/dgnc and do like this: > > sudo insmod ./dgnc.ko What output, if any, did this generate? > sudo lsmod | grep dgnc Again, what messages? > sudo rmmod ./dgnc Again, what happened? > sudo insmod ./dgnc.ko And here? > After I re-insmod the dgnc module, my laptop is breakdown. What does "breakdown" mean? Did it hang entirely? Did you get a message in your dmesg output and/or on the console? Other? > My OS is debian 8.0. Is there a bug in dgnc.ko or something wrong with my > OS or kernel. If there is a bug, How can I find it? Start by providing enough info to see if there's a bug. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 848 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160224/28ca56d2/attachment.bin From greg at kroah.com Wed Feb 24 00:43:56 2016 From: greg at kroah.com (Greg KH) Date: Tue, 23 Feb 2016 21:43:56 -0800 Subject: Is there a bug in dgnc.ko? In-Reply-To: <20160224045742.GA24012@debian> References: <20160224045742.GA24012@debian> Message-ID: <20160224054356.GA1138@kroah.com> On Wed, Feb 24, 2016 at 12:57:42PM +0800, Navy Cheng wrote: > Hi, > > My kernel version is v4.4, and I have built drivers/staging/dgnc/dgnc.ko. > I change to *dir*/drivers/staging/dgnc and do like this: > > sudo insmod ./dgnc.ko Do you have the hardware that this driver controls? > sudo lsmod | grep dgnc Does that show anything? > sudo rmmod ./dgnc > sudo insmod ./dgnc.ko > > After I re-insmod the dgnc module, my laptop is breakdown. Then there's a bug to fix in the driver, it must not clean up everything properly. Based on a quick read of it, there is lots of things that need to be fixed in it, that's why it is in staging. If you are interested, I would suggest fixing this issue would be a great start. good luck! greg k-h From ranshalit at gmail.com Wed Feb 24 02:36:54 2016 From: ranshalit at gmail.com (Ran Shalit) Date: Wed, 24 Feb 2016 09:36:54 +0200 Subject: user rsyslog/syslog Message-ID: Hello, I am trying to write to rsyslog from application. With openlog(..., LOG_USER), it works fine and I find the log in /var/log/user.log (it is defines in /etc/rsyslog.d/50-defaults.conf ) But we need to enable different applications to have each its own log file. I tried to use LOG_LOCAL0 instead and configured it in /etc/rsyslog.d/50-defaults.conf the same way as user: local0.* action { type="omfile" FILE="/var/log/local0.log" FileOwner="root" FileGroup="adm" } I then did 1. /etc/init.d/rsyslog stop 2. /etc/init.d/rsyslog start I see no warnings or errors, and I started the application trying to write to LOG_LOCAL0, But there is no new file created, no logs. Is there any idea whatws wrong, or how I can achieve this multi user's logs ? Thank you, Ran From ruben at mrbrklyn.com Wed Feb 24 02:54:45 2016 From: ruben at mrbrklyn.com (Ruben Safir) Date: Wed, 24 Feb 2016 02:54:45 -0500 Subject: user rsyslog/syslog In-Reply-To: References: Message-ID: <56CD61C5.5060000@mrbrklyn.com> On 02/24/2016 02:36 AM, Ran Shalit wrote: > Hello, systemd? > > I am trying to write to rsyslog from application. > With openlog(..., LOG_USER), it works fine and I find the log in > /var/log/user.log (it is defines in /etc/rsyslog.d/50-defaults.conf ) > But we need to enable different applications to have each its own log file. > I tried to use LOG_LOCAL0 instead and configured it in > /etc/rsyslog.d/50-defaults.conf the same way as user: > > local0.* action > { > type="omfile" > FILE="/var/log/local0.log" > FileOwner="root" > FileGroup="adm" > > } > > I then did > 1. /etc/init.d/rsyslog stop > 2. /etc/init.d/rsyslog start > I see no warnings or errors, and I started the application trying to > write to LOG_LOCAL0, But there is no new file created, no logs. > > Is there any idea whatws wrong, or how I can achieve this multi user's logs ? > > Thank you, > Ran > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -- So many immigrant groups have swept through our town that Brooklyn, like Atlantis, reaches mythological proportions in the mind of the world - RI Safir 1998 http://www.mrbrklyn.com DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002 http://www.nylxs.com - Leadership Development in Free Software http://www2.mrbrklyn.com/resources - Unpublished Archive http://www.coinhangout.com - coins! http://www.brooklyn-living.com Being so tracked is for FARM ANIMALS and and extermination camps, but incompatible with living as a free human being. -RI Safir 2013 From Valdis.Kletnieks at vt.edu Wed Feb 24 03:17:33 2016 From: Valdis.Kletnieks at vt.edu (Valdis.Kletnieks at vt.edu) Date: Wed, 24 Feb 2016 03:17:33 -0500 Subject: user rsyslog/syslog In-Reply-To: References: Message-ID: <22877.1456301853@turing-police.cc.vt.edu> On Wed, 24 Feb 2016 09:36:54 +0200, Ran Shalit said: > I am trying to write to rsyslog from application. > With openlog(..., LOG_USER), it works fine and I find the log in > /var/log/user.log (it is defines in /etc/rsyslog.d/50-defaults.conf ) > But we need to enable different applications to have each its own log file. > I tried to use LOG_LOCAL0 instead and configured it in > /etc/rsyslog.d/50-defaults.conf the same way as user: > > local0.* action > { > type="omfile" > FILE="/var/log/local0.log" > FileOwner="root" > FileGroup="adm" > > } > > I then did > 1. /etc/init.d/rsyslog stop > 2. /etc/init.d/rsyslog start > I see no warnings or errors, and I started the application trying to > write to LOG_LOCAL0, But there is no new file created, no logs. > > Is there any idea whatws wrong, or how I can achieve this multi user's logs ? Not really a kernel issue, is it? But anyhow.... First thing to do is to make sure your code checks the return code from openlog(). The next thing to check is that your application is actually trying to log to LOCAL0. Using the debugging tool of your choice, ensure that control flow reaches the syslog() statement. Make sure that it's using LOCAL0. Define an action for *.* dumping to /var/log/everything.log - does your message show up in there? In other words, all the usual userspace debugging.. start at the beginning and trace through the flow. And since rsyslog allows regex matching, maybe you should be letting all the applications continue logging to LOG_USER, and then use filters of the form 'programname startswith app1', 'programname startswith app2', and so on to select based on the program name. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 848 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160224/15fcee38/attachment.bin From mulyadi.santosa at gmail.com Wed Feb 24 04:12:02 2016 From: mulyadi.santosa at gmail.com (Mulyadi Santosa) Date: Wed, 24 Feb 2016 16:12:02 +0700 Subject: Partial (?) kernel crash dump ? In-Reply-To: References: Message-ID: On Wed, Feb 24, 2016 at 11:11 AM, Rolland Santimano < rolland.santimano at gmail.com> wrote: > I'm trying to save a crashdump on a DellFC630 with 128G of RAM, > running Ubuntu 14.10, kernel 3.16.0-23-generic; used to host a bunch > of KVM-style VMs. > > Since saving the full dump is taking forever & a day, I'm looking to > save a partial dump -- maybe a few addr space regions only from the > kernel VAS. > > Is this even possible ? Any other options ? Or am I missing something here > ? > > -- > Rolland > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > try to read this: http://events.linuxfoundation.org/sites/events/files/slides/slide_final_0.pdf It might be not what you're looking for, but IMHO worth to read -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com This email has been sent from a virus-free computer protected by Avast. www.avast.com <#DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160224/2660f1d0/attachment-0001.html From navych at 126.com Wed Feb 24 06:57:01 2016 From: navych at 126.com (Navy Cheng) Date: Wed, 24 Feb 2016 19:57:01 +0800 Subject: Is there a bug in dgnc.ko? In-Reply-To: <20160224054356.GA1138@kroah.com> References: <20160224045742.GA24012@debian> <20160224054356.GA1138@kroah.com> Message-ID: <20160224115701.GB1998@debian> On Tue, Feb 23, 2016 at 09:43:56PM -0800, Greg KH wrote: > On Wed, Feb 24, 2016 at 12:57:42PM +0800, Navy Cheng wrote: > > Hi, > > > > My kernel version is v4.4, and I have built drivers/staging/dgnc/dgnc.ko. > > I change to *dir*/drivers/staging/dgnc and do like this: > > > > sudo insmod ./dgnc.ko > > Do you have the hardware that this driver controls? I'm not sure. My laptop is Dell Inspiron 14R - 5437 and I don't know if there is the right hardware. I often don't know about what a driver is used for in drivers/staging/. Is there any good way to know the function of a driver or module? > > > sudo lsmod | grep dgnc > > Does that show anything? Output: dgnc 65536 0 > > sudo rmmod ./dgnc > > sudo insmod ./dgnc.ko > > > > After I re-insmod the dgnc module, my laptop is breakdown. > > Then there's a bug to fix in the driver, it must not clean up everything > properly. Based on a quick read of it, there is lots of things that > need to be fixed in it, that's why it is in staging. If you are > interested, I would suggest fixing this issue would be a great start. I'm very glad to get your advice to fix this issue. As a kernelnewbies, I have sent two patches about code cleaning to you, and they are merged to the kernel tree. I realy interested to fix this bug to improve my understanding of the kerenl. Thank you. From sudipm.mukherjee at gmail.com Wed Feb 24 07:03:11 2016 From: sudipm.mukherjee at gmail.com (Sudip Mukherjee) Date: Wed, 24 Feb 2016 17:33:11 +0530 Subject: Is there a bug in dgnc.ko? In-Reply-To: <20160224115701.GB1998@debian> References: <20160224045742.GA24012@debian> <20160224054356.GA1138@kroah.com> <20160224115701.GB1998@debian> Message-ID: On Wed, Feb 24, 2016 at 5:27 PM, Navy Cheng wrote: > On Tue, Feb 23, 2016 at 09:43:56PM -0800, Greg KH wrote: >> On Wed, Feb 24, 2016 at 12:57:42PM +0800, Navy Cheng wrote: >> > Hi, >> > >> > My kernel version is v4.4, and I have built drivers/staging/dgnc/dgnc.ko. >> > I change to *dir*/drivers/staging/dgnc and do like this: >> > >> > sudo insmod ./dgnc.ko >> >> Do you have the hardware that this driver controls? > > I'm not sure. My laptop is Dell Inspiron 14R - 5437 and I don't know if > there is the right hardware. I often don't know about what a driver is used > for in drivers/staging/. Is there any good way to know the function of a > driver or module? > >> >> > sudo lsmod | grep dgnc >> >> Does that show anything? > > Output: dgnc 65536 0 > >> > sudo rmmod ./dgnc what did dmesg showed after you did rmmod? regards sudip From navych at 126.com Wed Feb 24 06:36:21 2016 From: navych at 126.com (Navy Cheng) Date: Wed, 24 Feb 2016 19:36:21 +0800 Subject: Is there a bug in dgnc.ko? In-Reply-To: <11119.1456292260@turing-police.cc.vt.edu> References: <20160224045742.GA24012@debian> <11119.1456292260@turing-police.cc.vt.edu> Message-ID: <20160224113621.GA1998@debian> On Wed, Feb 24, 2016 at 12:37:40AM -0500, Valdis.Kletnieks at vt.edu wrote: > On Wed, 24 Feb 2016 12:57:42 +0800, Navy Cheng said: > > Hi, > > > > My kernel version is v4.4, and I have built drivers/staging/dgnc/dgnc.ko. > > I change to *dir*/drivers/staging/dgnc and do like this: > > > > sudo insmod ./dgnc.ko > > What output, if any, did this generate? No output. I use *dmesg* to find more information: [ 572.915977] dgnc: module is from the staging directory, the quality is unknown, you have been warned. > > sudo lsmod | grep dgnc > > Again, what messages? Output: dgnc 65536 0 > > sudo rmmod ./dgnc > > Again, what happened? No output. After *dmesg*, no more info in the ring buffer. > > sudo insmod ./dgnc.ko > > And here? No output. > > After I re-insmod the dgnc module, my laptop is breakdown. > > What does "breakdown" mean? Did it hang entirely? Did you get a message > in your dmesg output and/or on the console? Other? The GUI stop work and any key in my laptop is not work. The *Caps Lock lamp* in the keyboard is flashing. > > My OS is debian 8.0. Is there a bug in dgnc.ko or something wrong with my > > OS or kernel. If there is a bug, How can I find it? > > Start by providing enough info to see if there's a bug. > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies From priyaranjan45678 at gmail.com Wed Feb 24 07:14:17 2016 From: priyaranjan45678 at gmail.com (priyaranjan) Date: Wed, 24 Feb 2016 17:44:17 +0530 Subject: Does Linux kernel disables any Interrupts while going into IRQ handler? Message-ID: When an Interrupt occurs most device drivers creates a critical section using spin_lock_irqsave or spin_lock_irq which disables the interrupt. In such a case the Interrupts are disabled by the IRQ handler. My question is whether Linux kernel disables any interrupts just when the IRQ handler executes or it just wait for the IRQ handler programmer to disable the IRQ in whatever way? My understanding is that Russel King has implemented IRQ_DISABLED, If this flag is set then only the IRQ that has occurred is disabled lately however enabled automatically by Kernel after IRQ handler finishes. Is that correct? This also happens in delayed manner.Can anyone explain me how exactly the IRQ disabling is delayed? >From free-electrons link , what I read is :- *The interrupt is kept enabled and is masked in the flow handler when an interrupt event happens*. This prevents losing edge interrupts on hardware which does not store an edge interrupt event while the interrupt is disabled at the hardware level. Can anyone please explain the bold line here? Regards, Priyaranjan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160224/cb7779d5/attachment.html From ranshalit at gmail.com Wed Feb 24 07:20:23 2016 From: ranshalit at gmail.com (Ran Shalit) Date: Wed, 24 Feb 2016 14:20:23 +0200 Subject: user rsyslog/syslog In-Reply-To: <22877.1456301853@turing-police.cc.vt.edu> References: <22877.1456301853@turing-police.cc.vt.edu> Message-ID: On Wed, Feb 24, 2016 at 10:17 AM, wrote: > On Wed, 24 Feb 2016 09:36:54 +0200, Ran Shalit said: > >> I am trying to write to rsyslog from application. >> With openlog(..., LOG_USER), it works fine and I find the log in >> /var/log/user.log (it is defines in /etc/rsyslog.d/50-defaults.conf ) >> But we need to enable different applications to have each its own log file. >> I tried to use LOG_LOCAL0 instead and configured it in >> /etc/rsyslog.d/50-defaults.conf the same way as user: >> >> local0.* action >> { >> type="omfile" >> FILE="/var/log/local0.log" >> FileOwner="root" >> FileGroup="adm" >> >> } >> >> I then did >> 1. /etc/init.d/rsyslog stop >> 2. /etc/init.d/rsyslog start >> I see no warnings or errors, and I started the application trying to >> write to LOG_LOCAL0, But there is no new file created, no logs. >> >> Is there any idea whatws wrong, or how I can achieve this multi user's logs ? > > Not really a kernel issue, is it? But anyhow.... > > First thing to do is to make sure your code checks the return code > from openlog(). > > The next thing to check is that your application is actually trying to > log to LOCAL0. Using the debugging tool of your choice, ensure that control > flow reaches the syslog() statement. Make sure that it's using LOCAL0. > > Define an action for *.* dumping to /var/log/everything.log - does your > message show up in there? > > In other words, all the usual userspace debugging.. start at the beginning > and trace through the flow. > > And since rsyslog allows regex matching, maybe you should be letting all the > applications continue logging to LOG_USER, and then use filters > of the form 'programname startswith app1', 'programname startswith app2', > and so on to select based on the program name. > Hi Vladis, Thanks a lot. I see that openlog has not retuen value, and it seems that only openlog get the LOG_USER (or LOG_LOCAL0) arguments. the other functions such as syslog does not use it at all, for example: openlog("Logs", "", LOG_USER); syslog(LOG_INFO, "Start logging"); closelog(); Anyway, on debugging I seet that these routines are called, but nothing gets into the expected localX files. It only works with the USER file. Maybe the last suggestion will be the most practical if this issue can't be resolved, which means that I will use one file for all logs, in which each line will have its own tag string according to the application. Thanks, Ran From narkewoody at gmail.com Wed Feb 24 09:07:13 2016 From: narkewoody at gmail.com (Woody Wu) Date: Wed, 24 Feb 2016 22:07:13 +0800 Subject: Porting to an S3C2416 failed with no console message In-Reply-To: <56CC88B3.80202@gmail.com> References: <56CC88B3.80202@gmail.com> Message-ID: On Wednesday, February 24, 2016, nick wrote: > > > On 2016-02-23 09:35 AM, Woody Wu wrote: > > Hi, > > > > I am trying to port 3.18 kernel to a S3C2416. Years ago, a guy helped me > > ported a 3.1.0 kernel to the same board, and the guy left and the kernel > > got too old. The guy also ported an u-boot as boot loader to load the > 3.1.0 > > kernel. I had the source code of the ported u-boot and the 3.1.0 linux. > > > > Now, my problem is that my porting of 3.18 seems not working, I did not > see > > any kernel message printed to the first SoC serial port as I expected. As > > long as I can get kernel message printed to the serial, I think I can > step > > by step finish the whole porting work eventually. But now, there is no > > message and I have no other hardware debugging tools and knowledges, I > felt > > I lost my way totally. > > > > I hope someone can give me some suggestions, clues to help me > > understand where to check and what's the possible causes. > > > Firstly my knowledge with kernel upstream porting to a non mainlined > port is not as good as some of the other people here but let's see what > I can do. > Since I found the old porting of the 3.1.0 is quit similar to SMDK2416, > > then I started my work from also the SMDK2416 board code in 3.18. > > Basically, I defined the machine-code to match that passed from u-boot, > and > > copied the MACHINE-START definition section with removing of some > > not-immediately-needed stuff such as USB, NAND and HMSUI etc. I also > > enabled the S3C2410 serial driver and enabled the serial console > supporting > > for the Samsung SoC. Of course, I had the kernel parameter of > > "console=ttySAC0", ttySAC0 is the Linux device name of the first UART > port > > in the SoC. These are basically what I had done and I guess the SoC > serial > > part between my board and SMDK2416 should be very similar and the kernel > > should at least be able to print it's first message then I should have > > chance to fix other differences. But there is no kernel message at all > as I > > mentioned above. > > Can you either send me the patch series that the other developer used to > port > your port to 3.1.0 or I would recommend stating on kernel 3.1.0 as it's > still > a longterm kernel unless you have reason to upgrade. If you do I would > recommend > you either get something with experience or yourself to try and upstream > the > differences between your board and the mainline so others will not have to > do > the same work as you unless your company will not allow you to do this. > > What should I check for the problem usually? Is there a checking list to > go > > through? I hope you experts can give me some clues. Thanks in advance! > > To make a patch, I have to have the original 3.1.0, but I was confused about how the kernel.org organized, I just cannot find how to get a 3.1.0 tarball or git repository. Can you please give me a hint? BTW, I also dont really understand what the 'mainline' mens. If I download a latest 3.18.27.tar.xz, is it a mainline? > Their are two things you can do here either try and enable early_printk as > this > seems to be happening before the serial console is able to print the first > kernel > message. The second is trying to enable kgdb on the board and use another > computer > over the serial port to do this sort of debugging. > Hope this gets you started, > Nick Firstly, I will try early_printk soon. Before that, can your tell me what are differences betweenthe following printing technologies: 1, early_printk 2, early_print, 3, putc used in arch/arm/compressed/misc.c. Secondly, I have a question about kgdb. You see the situation is that my serial port had been initialized by the u-boot, but not yet touched by the kernel since the kernel is not yet run and waiting for debugging, and now I am jusr sitting in the u-boot command prompt and has an uImage kernel image file loaded in a region of SDRAM, do you think that these all above are enough or possible to the kgdb debugging? Many thanks! > Best Regards, > > woody > > > > > > > > > > _______________________________________________ > > Kernelnewbies mailing list > > Kernelnewbies at kernelnewbies.org > > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > > -- Life is the only flaw in an otherwise perfect nonexistence -- Schopenhauer woody public key at http://subkeys.pgp.net:11371 (narkewoody at gmail.com) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160224/5a963b55/attachment-0001.html From jonathan.nifenecker at gmail.com Wed Feb 24 10:11:34 2016 From: jonathan.nifenecker at gmail.com (jonathan nifenecker) Date: Wed, 24 Feb 2016 16:11:34 +0100 Subject: Does Linux kernel disables any Interrupts while going into IRQ handler? In-Reply-To: References: Message-ID: Hi, I'll give a try on this one, I've just getting interested in the kernel, but have a very good knowledge of microcontroller and think I can enlighten you with some hardware explanation on that : when an interrupt occur and is enabled, a flag is set at the hardware level in some interrupt flag register. (this register is set to 1 by hardware only, the software may only clear it to 0 to acknowledge the interrupt has been treated. It may be automatically cleared when the interrupt handler launch the appropriate function call.) The "mask" in your bold citation is another register, the interrupt mask register. It allow to control temporarily the execution of particular interrupt on a case by case basis. thus letting other interrupt occurs while preventing a particular one. (this register is set by software, you can think of it as an "interrupt handler inhibitor register" ) Those 2 register are wired into a bitwise AND before the signal arrived in the interrupt handler. the interrupt handler launch the appropriate function call corresponding to an interrupt signal received. So because of the AND logic, if the interrupt mask bit is 0 for a specific interrupt, the interrupt handler will see no positive edge whatever the interrupt occurred. BUT If the interrupt occurred, the interrupt flag will still be set to 1, and not loose the information of an interrupt occurred. If you set back the mask to 1, 1 AND 1 =1 the signal will then propagate to the interrupt handler and the function call will be launch right away ! wikipedia on Mask . What may be confuse here is that the bitwise operation can be executed completely by the hardware (instant reactivity), so you are dealing with mask without seeing interrupt_flag ^ interrupt_mask anywhere in the code. Hope that help. Jonathan 2016-02-24 13:14 GMT+01:00 priyaranjan : > When an Interrupt occurs most device drivers creates a critical section > using spin_lock_irqsave or spin_lock_irq which disables the interrupt. > > In such a case the Interrupts are disabled by the IRQ handler. My question > is whether Linux kernel disables any interrupts just when the IRQ handler > executes or it just wait for the IRQ handler programmer to disable the IRQ > in whatever way? > > My understanding is that Russel King has implemented IRQ_DISABLED, If this > flag is set then only the IRQ that has occurred is disabled lately however > enabled automatically by Kernel after IRQ handler finishes. Is that > correct? This also happens in delayed manner.Can anyone explain me how > exactly the IRQ disabling is delayed? > > From free-electrons link > , > what I read is :- > > *The interrupt is kept enabled and is masked in the flow handler when an > interrupt event happens*. This prevents losing edge interrupts on > hardware which does not store an edge interrupt event while the interrupt > is disabled at the hardware level. > > Can anyone please explain the bold line here? > > Regards, > > Priyaranjan > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160224/2230720a/attachment.html From Valdis.Kletnieks at vt.edu Wed Feb 24 11:53:37 2016 From: Valdis.Kletnieks at vt.edu (Valdis.Kletnieks at vt.edu) Date: Wed, 24 Feb 2016 11:53:37 -0500 Subject: user rsyslog/syslog In-Reply-To: References: <22877.1456301853@turing-police.cc.vt.edu> Message-ID: <4777.1456332817@turing-police.cc.vt.edu> On Wed, 24 Feb 2016 14:20:23 +0200, Ran Shalit said: > Maybe the last suggestion will be the most practical if this issue > can't be resolved, which means that I will use one file for all logs, > in which each line will have its own tag string according to the > application. No, what you do is you use an rsyslog filter on the program name, and use that to route each program's logs to a different file. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 848 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160224/f4cbea80/attachment.bin From greg at kroah.com Wed Feb 24 13:25:02 2016 From: greg at kroah.com (Greg KH) Date: Wed, 24 Feb 2016 10:25:02 -0800 Subject: Is there a bug in dgnc.ko? In-Reply-To: <20160224115701.GB1998@debian> References: <20160224045742.GA24012@debian> <20160224054356.GA1138@kroah.com> <20160224115701.GB1998@debian> Message-ID: <20160224182502.GA22830@kroah.com> On Wed, Feb 24, 2016 at 07:57:01PM +0800, Navy Cheng wrote: > On Tue, Feb 23, 2016 at 09:43:56PM -0800, Greg KH wrote: > > On Wed, Feb 24, 2016 at 12:57:42PM +0800, Navy Cheng wrote: > > > Hi, > > > > > > My kernel version is v4.4, and I have built drivers/staging/dgnc/dgnc.ko. > > > I change to *dir*/drivers/staging/dgnc and do like this: > > > > > > sudo insmod ./dgnc.ko > > > > Do you have the hardware that this driver controls? > > I'm not sure. My laptop is Dell Inspiron 14R - 5437 and I don't know if > there is the right hardware. I often don't know about what a driver is used > for in drivers/staging/. Is there any good way to know the function of a > driver or module? If you don't think you have the hardware, then almost always, you don't have the hardware, it's pretty simple :) > > > > > sudo lsmod | grep dgnc > > > > Does that show anything? > > Output: dgnc 65536 0 Great, it loaded, then crashes when you unload, congratulations, you can now work on fixing that bug! good luck, greg k-h From sunitad100 at gmail.com Wed Feb 24 21:40:24 2016 From: sunitad100 at gmail.com (SUNITA) Date: Thu, 25 Feb 2016 08:10:24 +0530 Subject: Project Idea.. In-Reply-To: <20160222161843.GA25683@kroah.com> References: <20160222161843.GA25683@kroah.com> Message-ID: Hello, I want to measure the battery usage of various applications in linux. I executed powerstat and powertop tools. Are there any other tools which indicate the power consumption by programs in linux. I want to calculate the power used by various scheduling programs. Also can Sysbench be an alternative to Mibench. Regards, Sunita On 2/22/16, Greg KH wrote: > On Mon, Feb 22, 2016 at 10:54:54AM +0530, SUNITA wrote: >> Respected Sir/Madam, >> I am trying to study the effect of Scheduler Policies on Energy >> Consumption of Portable Device. > > There are lots of people currently working on this, and have been for > many years. I know of at least 3 complete implementations at the > moment (two of which ship in some Android phones), so I would suggest > working with one of those groups to try to get their code merged into > the Linux kernel. To create a 4th implementation would seem like a bit > of a redundant effort. > > Search the archives of lwn.net for details about this if you are > interested. > > good luck! > > greg k-h > From priyaranjan45678 at gmail.com Thu Feb 25 01:07:32 2016 From: priyaranjan45678 at gmail.com (priyaranjan) Date: Thu, 25 Feb 2016 11:37:32 +0530 Subject: Mutex and Spinlock locked together Message-ID: Hello All, Do you have any idea of a situation where we would need mutex and spinlock to be locked together? I think there is an example for this in Linux kernel. Can anyone help me? Regards, Priyaranjan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160225/ef499e8c/attachment.html From navych at 126.com Thu Feb 25 02:05:14 2016 From: navych at 126.com (Navy Cheng) Date: Thu, 25 Feb 2016 15:05:14 +0800 Subject: Is there a bug in dgnc.ko? In-Reply-To: References: <20160224045742.GA24012@debian> <20160224054356.GA1138@kroah.com> <20160224115701.GB1998@debian> Message-ID: <20160225070514.GA26084@debian> On Wed, Feb 24, 2016 at 05:33:11PM +0530, Sudip Mukherjee wrote: > On Wed, Feb 24, 2016 at 5:27 PM, Navy Cheng wrote: > > On Tue, Feb 23, 2016 at 09:43:56PM -0800, Greg KH wrote: > >> On Wed, Feb 24, 2016 at 12:57:42PM +0800, Navy Cheng wrote: > >> > Hi, > >> > > >> > My kernel version is v4.4, and I have built drivers/staging/dgnc/dgnc.ko. > >> > I change to *dir*/drivers/staging/dgnc and do like this: > >> > > >> > sudo insmod ./dgnc.ko > >> > >> Do you have the hardware that this driver controls? > > > > I'm not sure. My laptop is Dell Inspiron 14R - 5437 and I don't know if > > there is the right hardware. I often don't know about what a driver is used > > for in drivers/staging/. Is there any good way to know the function of a > > driver or module? > > > >> > >> > sudo lsmod | grep dgnc > >> > >> Does that show anything? > > > > Output: dgnc 65536 0 > > > >> > sudo rmmod ./dgnc > > what did dmesg showed after you did rmmod? > *dmesg* show nothing after I rmmod dgnc. I guess something wrong with dgnc_cleanup_module() which is called when dgnc is removed. From devesh28 at gmail.com Thu Feb 25 04:23:43 2016 From: devesh28 at gmail.com (Devesh Sharma) Date: Thu, 25 Feb 2016 14:53:43 +0530 Subject: Mutex and Spinlock locked together In-Reply-To: References: Message-ID: Hi In running kernel there are many places you can look to get the usage. But the bottom line is * You can take a spinlock under a mutex. e.g. mutex_lock--->spinlock-----critical section-----spinunlock--->mutex_unlock. * You can not take a mutex under a spinlock. e.g. spinlock--->mutex_lock -----critical section ....mutex_unlock---->spinunlock is not allowed. On Thu, Feb 25, 2016 at 11:37 AM, priyaranjan wrote: > Hello All, > > Do you have any idea of a situation where we would need mutex and spinlock > to be locked together? I think there is an example for this in Linux > kernel. Can anyone help me? > > Regards, > Priyaranjan > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > -- Please don't print this E- mail unless you really need to - this will preserve trees on planet earth. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160225/1c1c8011/attachment.html From priyaranjan45678 at gmail.com Thu Feb 25 05:12:24 2016 From: priyaranjan45678 at gmail.com (priyaranjan) Date: Thu, 25 Feb 2016 15:42:24 +0530 Subject: Mutex and Spinlock locked together In-Reply-To: References: Message-ID: >On Thu, Feb 25, 2016 at 2:53 PM, Devesh Sharma wrote: >Hi >In running kernel there are many places you can look to get the usage. But the bottom line is Can you tell me the specific use case? or give me the file name/driver where this is used. >* You can take a spinlock under a mutex. e.g. mutex_lock--->spinlock-----critical section-----spinunlock--->mutex_unlock. >* You can not take a mutex under a spinlock. e.g. spinlock--->mutex_lock -----critical section ....mutex_unlock---->spinunlock is not allowed. On Thu, Feb 25, 2016 at 11:37 AM, priyaranjan wrote: Hello All, Do you have any idea of a situation where we would need mutex and spinlock to be locked together? I think there is an example for this in Linux kernel. Can anyone help me? Regards, Priyaranjan _______________________________________________ Kernelnewbies mailing list Kernelnewbies at kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160225/7dc433fa/attachment.html From devesh28 at gmail.com Thu Feb 25 05:27:49 2016 From: devesh28 at gmail.com (Devesh Sharma) Date: Thu, 25 Feb 2016 15:57:49 +0530 Subject: Mutex and Spinlock locked together In-Reply-To: References: Message-ID: Check this out: drivers/infiniband/core/cache.c function: ib_cache_gid_add Line: 338 mutex_lock(&table->lock); write_lock_irq(&table->rwlock); . . . . write_unlock_irq(&table->rwlock); mutex_unlock(&table->lock); On Thu, Feb 25, 2016 at 3:42 PM, priyaranjan wrote: > >On Thu, Feb 25, 2016 at 2:53 PM, Devesh Sharma > wrote: > >Hi > > >In running kernel there are many places you can look to get the usage. > But the bottom line is > > Can you tell me the specific use case? or give me the file name/driver > where this is used. > > >* You can take a spinlock under a mutex. e.g. > mutex_lock--->spinlock-----critical section-----spinunlock--->mutex_unlock. > > >* You can not take a mutex under a spinlock. e.g. spinlock--->mutex_lock > -----critical section ....mutex_unlock---->spinunlock is not allowed. > > > On Thu, Feb 25, 2016 at 11:37 AM, priyaranjan > wrote: > Hello All, > > Do you have any idea of a situation where we would need mutex and spinlock > to be locked together? I think there is an example for this in Linux > kernel. Can anyone help me? > > Regards, > Priyaranjan > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > > > -- Please don't print this E- mail unless you really need to - this will preserve trees on planet earth. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160225/2ba12654/attachment-0001.html From narkewoody at gmail.com Thu Feb 25 11:55:40 2016 From: narkewoody at gmail.com (Woody Wu) Date: Fri, 26 Feb 2016 00:55:40 +0800 Subject: How to use earlycon and earlyprintk on Samsung S3C24xx Message-ID: Hi, It seems, at least in 4.4.2 kernel, earlyprintk parameter supports something like 's3c24xx,'. But I dont know where to find out the addr value of the first uart port on my *s3c2416* based board. Can someone please tell me? Also, I desire to know if the earlycon parameter supports the Samsung S3C24xx uarts, if so, what should the value of the parameter look like? Thank in advance, -woody -- Life is the only flaw in an otherwise perfect nonexistence -- Schopenhauer woody public key at http://subkeys.pgp.net:11371 (narkewoody at gmail.com) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160226/25b22b84/attachment.html From victorascroft at gmail.com Thu Feb 25 13:40:10 2016 From: victorascroft at gmail.com (victorascroft at gmail.com) Date: Fri, 26 Feb 2016 00:10:10 +0530 Subject: How to use earlycon and earlyprintk on Samsung S3C24xx In-Reply-To: References: Message-ID: <20160225184010.GA29444@Sanchayan-Arch> Hi, On 16-02-26 00:55:40, Woody Wu wrote: > Hi, > > It seems, at least in 4.4.2 kernel, earlyprintk parameter supports > something like 's3c24xx,'. But I dont know where to find out the addr > value of the first uart port on my *s3c2416* based board. Can someone > please tell me? > > Also, I desire to know if the earlycon parameter supports the Samsung > S3C24xx uarts, if so, what should the value of the parameter look like? Have a look in the documentation here https://www.kernel.org/doc/Documentation/kernel-parameters.txt The kernels kernel-parameter.txt documentation file lists the supported drivers. Generally the UART0 port is used for debugging but I guess there is no such hard and fast rule. For your particular board, you can check which UART port is used as the debug serial console and then get the address for the concerned UART by checking the relevant dtsi file in arch/arm/boot/dts/s3c24xx.dtsi or perhaps one of the exynosX.dtsi files? UART0 port seems to have address of 0x50000000? Regards, Sanchayan. > > Thank in advance, > > -woody > > > -- > Life is the only flaw in an otherwise perfect nonexistence > -- Schopenhauer > > woody > public key at http://subkeys.pgp.net:11371 (narkewoody at gmail.com) > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies From xiaonan830818 at gmail.com Fri Feb 26 05:13:02 2016 From: xiaonan830818 at gmail.com (Nan Xiao) Date: Fri, 26 Feb 2016 18:13:02 +0800 Subject: How to understan /proc/sys/kernel/sched_domain/cpu$/domain$/flags? Message-ID: Hi all, I find there is a flags file under /proc/sys/kernel/sched_domain/cpu$/domain$ directory, but can't figure out the meaning of this file: # cat flags 687 Could anyone tell me where I can find the definition of this file? Thanks in advance! Best Regards Nan Xiao -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160226/d7ff1df1/attachment.html From cakturk at gmail.com Fri Feb 26 09:18:30 2016 From: cakturk at gmail.com (Cihangir Akturk) Date: Fri, 26 Feb 2016 16:18:30 +0200 Subject: How to understan /proc/sys/kernel/sched_domain/cpu$/domain$/flags? In-Reply-To: References: Message-ID: <20160226141830.GA2556@portege.ulakbim.gov.tr> On Fri, Feb 26, 2016 at 06:13:02PM +0800, Nan Xiao wrote: > Hi all, > > I find there is a flags file under > /proc/sys/kernel/sched_domain/cpu$/domain$ directory, > but can't figure out the meaning of this file: > > # cat flags > 687 > > Could anyone tell me where I can find the definition of this file? Thanks Hi Nan, A quick grep on the source tree gives the following results; http://lxr.free-electrons.com/source/kernel/sched/core.c?v=4.2#L5221 > in advance! > > Best Regards > Nan Xiao From navych at 126.com Mon Feb 29 01:41:34 2016 From: navych at 126.com (Navy Cheng) Date: Mon, 29 Feb 2016 14:41:34 +0800 Subject: [PATCH] staging: dgnc: Remove useless and deadly judgment Message-ID: <20160229064133.GA14862@debian> pci_unregister_driver() should be used once dgnc module exit. It has nothing to do with dgnc_NumBoards. Remove the judgment of dgnc_NumBoards to avoid pci_unregister_driver() is not used when dgnc_NumBoards is 0. Signed-off-by: Navy Cheng --- drivers/staging/dgnc/dgnc_driver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c index fc6d298..20b0c3b 100644 --- a/drivers/staging/dgnc/dgnc_driver.c +++ b/drivers/staging/dgnc/dgnc_driver.c @@ -156,8 +156,7 @@ static void dgnc_cleanup_module(void) dgnc_tty_post_uninit(); - if (dgnc_NumBoards) - pci_unregister_driver(&dgnc_driver); + pci_unregister_driver(&dgnc_driver); } /* -- 2.1.4 From Valdis.Kletnieks at vt.edu Mon Feb 29 02:58:16 2016 From: Valdis.Kletnieks at vt.edu (Valdis.Kletnieks at vt.edu) Date: Mon, 29 Feb 2016 02:58:16 -0500 Subject: [PATCH] staging: dgnc: Remove useless and deadly judgment In-Reply-To: <20160229064133.GA14862@debian> References: <20160229064133.GA14862@debian> Message-ID: <15064.1456732696@turing-police.cc.vt.edu> On Mon, 29 Feb 2016 14:41:34 +0800, Navy Cheng said: > pci_unregister_driver() should be used once dgnc module exit. It has > nothing to do with dgnc_NumBoards. Remove the judgment of dgnc_NumBoards to > avoid pci_unregister_driver() is not used when dgnc_NumBoards is 0. > - if (dgnc_NumBoards) > - pci_unregister_driver(&dgnc_driver); > + pci_unregister_driver(&dgnc_driver); Does pci_unregister_driver do the right thing if there are 0 boards in the system? If this logic is wrong, shouldn't there also be a patch fixing the following in dgnc_init_module()? /* * Find and configure all the cards */ rc = pci_register_driver(&dgnc_driver); /* * If something went wrong in the scan, bail out of driver. */ if (rc < 0) { /* Only unregister if it was actually registered. */ if (dgnc_NumBoards) pci_unregister_driver(&dgnc_driver); else pr_warn("WARNING: dgnc driver load failed. No Digi Neo or Classic boards found.\n"); dgnc_cleanup_module(); While I'm at it, the entire NumBoards counting seems to be wonky - it looks like a *lot* of off-by-one errors. Looks like the programmer(s) weren't sure if they wanted to use that as a zero-based or one-based counter/index. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 848 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160229/4896e710/attachment.bin From martinhoury at gmail.com Mon Feb 29 05:47:16 2016 From: martinhoury at gmail.com (Martin Houry) Date: Mon, 29 Feb 2016 11:47:16 +0100 Subject: Question : How to access to bandwith statistics from kernel space? Message-ID: I have made some research and I could't find a library who can give me interfaces's statistics like max/min/average bandwidth, jitter, ... Do you know a way to do this? Thank you Martin From navych at 126.com Mon Feb 29 07:27:41 2016 From: navych at 126.com (Navy Cheng) Date: Mon, 29 Feb 2016 20:27:41 +0800 Subject: [PATCH] staging: dgnc: Remove useless and deadly judgment In-Reply-To: <15064.1456732696@turing-police.cc.vt.edu> References: <20160229064133.GA14862@debian> <15064.1456732696@turing-police.cc.vt.edu> Message-ID: <20160229122740.GA11064@debian> On Mon, Feb 29, 2016 at 02:58:16AM -0500, Valdis.Kletnieks at vt.edu wrote: > On Mon, 29 Feb 2016 14:41:34 +0800, Navy Cheng said: > > pci_unregister_driver() should be used once dgnc module exit. It has > > nothing to do with dgnc_NumBoards. Remove the judgment of dgnc_NumBoards to > > avoid pci_unregister_driver() is not used when dgnc_NumBoards is 0. > > > - if (dgnc_NumBoards) > > - pci_unregister_driver(&dgnc_driver); > > + pci_unregister_driver(&dgnc_driver); > > Does pci_unregister_driver do the right thing if there are 0 boards > in the system? I have no dgnc device in my laptop. After *insmod* and *rmmod* dgnc module, I can re-insmod dgnc successfully. If dgnc is *rmmod*, the dgnc-file in /sys will disappear. > If this logic is wrong, shouldn't there also be a patch fixing the > following in dgnc_init_module()? Yes, I thought dgnc_init_module should be fixed. But I'm not familiar with how to submitting patchset. I decide to fix dgnc_cleanup_module() first. > /* > * Find and configure all the cards > */ > rc = pci_register_driver(&dgnc_driver); > > /* > * If something went wrong in the scan, bail out of driver. > */ > if (rc < 0) { > /* Only unregister if it was actually registered. */ > if (dgnc_NumBoards) > pci_unregister_driver(&dgnc_driver); > else > pr_warn("WARNING: dgnc driver load failed. No Digi Neo or Classic boards found.\n"); > > dgnc_cleanup_module(); > > While I'm at it, the entire NumBoards counting seems to be wonky - it looks > like a *lot* of off-by-one errors. Looks like the programmer(s) weren't sure > if they wanted to use that as a zero-based or one-based counter/index. > Maybe we can fix the *init* and *exit* like this: static int __init dgnc_init_module(void) { int rc; rc = dgnc_start(); if (rc < 0) goto err1; rc = pci_register_driver(&dgnc_driver) if (rc <0) { goto err1; pr_warn("...."); } rc = dgnc_create_driver_sysfiles(&dgnc_driver); if (rc = 0) goto err2; return rc; err2: pci_unregister_driver(&dgnc_driver); err1: dgnc_end(); return rc; } static void dgnc_cleanup_module(void) { int i; dgnc_remove_driver_sysfiles(&dgnc_driver); for (i = 0; i < dgnc_NumBoards; ++i) { dgnc_remove_ports_sysfiles(dgnc_Board[i]); dgnc_tty_uninit(dgnc_Board[i]); dgnc_cleanup_board(dgnc_Board[i]); } pci_unregister_driver(&dgnc_driver); dgnc_end(); } From Valdis.Kletnieks at vt.edu Mon Feb 29 11:10:35 2016 From: Valdis.Kletnieks at vt.edu (Valdis.Kletnieks at vt.edu) Date: Mon, 29 Feb 2016 11:10:35 -0500 Subject: Question : How to access to bandwith statistics from kernel space? In-Reply-To: References: Message-ID: <54062.1456762235@turing-police.cc.vt.edu> On Mon, 29 Feb 2016 11:47:16 +0100, Martin Houry said: > I have made some research and I could't find a library who can give > me interfaces's statistics like max/min/average bandwidth, jitter, ... > > Do you know a way to do this? What problem are you trying to solve from within the kernel with those statistics? You probably should look at how the various TCP congestion routines work. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 848 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160229/282c18c8/attachment.bin From sunitad100 at gmail.com Mon Feb 29 20:30:36 2016 From: sunitad100 at gmail.com (SUNITA) Date: Tue, 1 Mar 2016 07:00:36 +0530 Subject: Project Idea.. In-Reply-To: References: <20160222161843.GA25683@kroah.com> Message-ID: There are four scheduling policies. Is it feasible if i design a scheduling policy which will overcome the drawbacks of sched_RR. The purpose is to reduce the number of context switches. I have to modify fair.c Regards, Sunita On 25 Feb 2016 08:10, "SUNITA" wrote: > Hello, > > I want to measure the battery usage of various applications in linux. > I executed powerstat and powertop tools. Are there any other tools > which indicate the power consumption by programs in linux. > > I want to calculate the power used by various scheduling programs. > > Also can Sysbench be an alternative to Mibench. > > Regards, > Sunita > > > On 2/22/16, Greg KH wrote: > > On Mon, Feb 22, 2016 at 10:54:54AM +0530, SUNITA wrote: > >> Respected Sir/Madam, > >> I am trying to study the effect of Scheduler Policies on Energy > >> Consumption of Portable Device. > > > > There are lots of people currently working on this, and have been for > > many years. I know of at least 3 complete implementations at the > > moment (two of which ship in some Android phones), so I would suggest > > working with one of those groups to try to get their code merged into > > the Linux kernel. To create a 4th implementation would seem like a bit > > of a redundant effort. > > > > Search the archives of lwn.net for details about this if you are > > interested. > > > > good luck! > > > > greg k-h > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160301/f8f73b49/attachment.html From greg at kroah.com Mon Feb 29 21:47:20 2016 From: greg at kroah.com (Greg KH) Date: Mon, 29 Feb 2016 18:47:20 -0800 Subject: Project Idea.. In-Reply-To: References: <20160222161843.GA25683@kroah.com> Message-ID: <20160301024720.GA17219@kroah.com> On Tue, Mar 01, 2016 at 07:00:36AM +0530, SUNITA wrote: > There are four scheduling policies.? Is it feasible if i design a scheduling > policy which will overcome the drawbacks of sched_RR.? > The purpose is to reduce the number of context switches. > I have to modify fair.c That sounds like a homework question, why are you trying to do this without doing research into how it has already been solved 4 different times? Hint, if you have an Android phone, odds are one of those solutions is in the kernel in it, go get the source tree and look at the changes that were made. good luck, greg k-h