RE: [RFC] arm:extend the reserved mrmory for initrd to be page aligned
Oh, I see, I don't consider non-of platform kernels, I will send V2 patch for this . Thanks -Original Message- From: Russell King - ARM Linux [mailto:li...@arm.linux.org.uk] Sent: Monday, September 15, 2014 6:30 PM To: Wang, Yalin Cc: 'Will Deacon'; 'linux-ker...@vger.kernel.org'; 'linux-arm-ker...@lists.infradead.org'; 'linux...@kvack.org'; linux-arm-msm@vger.kernel.org Subject: Re: [RFC] arm:extend the reserved mrmory for initrd to be page aligned On Mon, Sep 15, 2014 at 06:22:12PM +0800, Wang, Yalin wrote: > Oh, I see your meaning, > Yeah , my initrd is a cpio image, > And it can still work after apply this patch. Okay, that's what I wanted to know. However, I believe your patch to be incorrect. You delete the assignments to initrd_start and initrd_end in arm_memblock_init(), which will result in non-OF platforms having no initrd. The reason is that OF platforms set initrd_start and initrd_size from the OF code (drivers/of/fdt.c), but ATAG platforms only set our private phys_* versions. The reason I went with phys_* stuff was to permit better verification of the addresses passed - that the addresses were indeed memory locations before passing them through something like __va(). -- FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up according to speedtest.net. -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RFC] arm:extend the reserved mrmory for initrd to be page aligned
On Mon, Sep 15, 2014 at 06:22:12PM +0800, Wang, Yalin wrote: > Oh, I see your meaning, > Yeah , my initrd is a cpio image, > And it can still work after apply this patch. Okay, that's what I wanted to know. However, I believe your patch to be incorrect. You delete the assignments to initrd_start and initrd_end in arm_memblock_init(), which will result in non-OF platforms having no initrd. The reason is that OF platforms set initrd_start and initrd_size from the OF code (drivers/of/fdt.c), but ATAG platforms only set our private phys_* versions. The reason I went with phys_* stuff was to permit better verification of the addresses passed - that the addresses were indeed memory locations before passing them through something like __va(). -- FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up according to speedtest.net. -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [RFC] arm:extend the reserved mrmory for initrd to be page aligned
Hi Oh, I see your meaning, Yeah , my initrd is a cpio image, And it can still work after apply this patch. -Original Message- From: Russell King - ARM Linux [mailto:li...@arm.linux.org.uk] Sent: Monday, September 15, 2014 6:17 PM To: Wang, Yalin Cc: 'Will Deacon'; 'linux-ker...@vger.kernel.org'; 'linux-arm-ker...@lists.infradead.org'; 'linux...@kvack.org'; linux-arm-msm@vger.kernel.org Subject: Re: [RFC] arm:extend the reserved mrmory for initrd to be page aligned On Mon, Sep 15, 2014 at 05:59:27PM +0800, Wang, Yalin wrote: > Hi > > Add more log: > <4>[0.00] INITRD unalign phys address:0x0200+0x0022fb0e > <4>[0.00] INITRD aligned phys address:0x0200+0x0023 > <4>[0.574868] free_initrd: free initrd 0xc200+0xc222fb0e > <4>[0.579398] free_initrd_mem: free pfn:8192---8752 > > The inird used memory is still the same as the one passed by > bootloads, I don't change it. It should be safe. This tells me nothing about whether the initrd is actually /used/. What it tells me is that it's being freed. The function of an initrd is not to be a chunk of memory which gets freed later on in the boot process. It is there to provide an "initial ramdisk" (whether it be a filesystem image, or a CPIO compressed archive) for userspace to run. So, have you checked that initrd is still functional after this patch? -- FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up according to speedtest.net. -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RFC] arm:extend the reserved mrmory for initrd to be page aligned
On Mon, Sep 15, 2014 at 05:59:27PM +0800, Wang, Yalin wrote: > Hi > > Add more log: > <4>[0.00] INITRD unalign phys address:0x0200+0x0022fb0e > <4>[0.00] INITRD aligned phys address:0x0200+0x0023 > <4>[0.574868] free_initrd: free initrd 0xc200+0xc222fb0e > <4>[0.579398] free_initrd_mem: free pfn:8192---8752 > > The inird used memory is still the same as the one passed by bootloads, > I don't change it. It should be safe. This tells me nothing about whether the initrd is actually /used/. What it tells me is that it's being freed. The function of an initrd is not to be a chunk of memory which gets freed later on in the boot process. It is there to provide an "initial ramdisk" (whether it be a filesystem image, or a CPIO compressed archive) for userspace to run. So, have you checked that initrd is still functional after this patch? -- FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up according to speedtest.net. -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [RFC] arm:extend the reserved mrmory for initrd to be page aligned
Hi Add more log: <4>[0.00] INITRD unalign phys address:0x0200+0x0022fb0e <4>[0.00] INITRD aligned phys address:0x0200+0x0023 <4>[0.574868] free_initrd: free initrd 0xc200+0xc222fb0e <4>[0.579398] free_initrd_mem: free pfn:8192---8752 The inird used memory is still the same as the one passed by bootloads, I don't change it. It should be safe. -Original Message- From: Russell King - ARM Linux [mailto:li...@arm.linux.org.uk] Sent: Monday, September 15, 2014 5:30 PM To: Wang, Yalin Cc: 'Will Deacon'; 'linux-ker...@vger.kernel.org'; 'linux-arm-ker...@lists.infradead.org'; 'linux...@kvack.org'; linux-arm-msm@vger.kernel.org Subject: Re: [RFC] arm:extend the reserved mrmory for initrd to be page aligned On Mon, Sep 15, 2014 at 05:07:53PM +0800, Wang, Yalin wrote: > Hi > > I tested it on my phone, > >From log: > <4>[0.00] INITRD unalign phys address:0x0200+0x0022fb0e > <4>[0.00] INITRD aligned phys address:0x0200+0x0023 > > <4>[0.579474] free_initrd_mem: free pfn:8192---8752 > > The tail address is not aligned for most initrd image, This page will > not be freed and lost . Right, so from this I can assume that you only tested it by seeing what the addresses were, and the values used in free_initrd_mem(). What you haven't tested is whether the initrd actually gets used with your changes, which is more what I was interested in given what I found when reading your patch. -- FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up according to speedtest.net. -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RFC] arm:extend the reserved mrmory for initrd to be page aligned
On Mon, Sep 15, 2014 at 05:07:53PM +0800, Wang, Yalin wrote: > Hi > > I tested it on my phone, > >From log: > <4>[0.00] INITRD unalign phys address:0x0200+0x0022fb0e > <4>[0.00] INITRD aligned phys address:0x0200+0x0023 > > <4>[0.579474] free_initrd_mem: free pfn:8192---8752 > > The tail address is not aligned for most initrd image, > This page will not be freed and lost . Right, so from this I can assume that you only tested it by seeing what the addresses were, and the values used in free_initrd_mem(). What you haven't tested is whether the initrd actually gets used with your changes, which is more what I was interested in given what I found when reading your patch. -- FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up according to speedtest.net. -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [RFC] arm:extend the reserved mrmory for initrd to be page aligned
Hi I tested it on my phone, >From log: <4>[0.00] INITRD unalign phys address:0x0200+0x0022fb0e <4>[0.00] INITRD aligned phys address:0x0200+0x0023 <4>[0.579474] free_initrd_mem: free pfn:8192---8752 The tail address is not aligned for most initrd image, This page will not be freed and lost . This patch have a limitation that the tail page's not used Part should not be reserved by any other driver, And must be memory . This is true for most bootloaders , And we will print error if it is false . Thanks -Original Message- From: Russell King - ARM Linux [mailto:li...@arm.linux.org.uk] Sent: Monday, September 15, 2014 4:46 PM To: Wang, Yalin Cc: 'Will Deacon'; 'linux-ker...@vger.kernel.org'; 'linux-arm-ker...@lists.infradead.org'; 'linux...@kvack.org'; linux-arm-msm@vger.kernel.org Subject: Re: [RFC] arm:extend the reserved mrmory for initrd to be page aligned On Mon, Sep 15, 2014 at 01:11:14PM +0800, Wang, Yalin wrote: > this patch extend the start and end address of initrd to be page > aligned, so that we can free all memory including the un-page aligned > head or tail page of initrd, if the start or end address of initrd are > not page aligned, the page can't be freed by free_initrd_mem() function. Have you tested this patch? If so, how thorough was your testing? -- FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up according to speedtest.net. -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RFC] arm:extend the reserved mrmory for initrd to be page aligned
On Mon, Sep 15, 2014 at 01:11:14PM +0800, Wang, Yalin wrote: > this patch extend the start and end address of initrd to be page aligned, > so that we can free all memory including the un-page aligned head or tail > page of initrd, if the start or end address of initrd are not page > aligned, the page can't be freed by free_initrd_mem() function. Have you tested this patch? If so, how thorough was your testing? -- FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up according to speedtest.net. -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html