<div dir="ltr"><div>Hi,</div><div><br></div><div>This is the hole that we see in system RAM.</div><div>Shouldn't the 0xA4D page be out of limit for Linux Kernel?</div><div><br></div><div># cat /proc/iomem </div><div>00000000-00a4cfff : System RAM</div><div>00a4d000-00a4dfff : csSIGILL </div><div>00a4e000-bfffffff : System RAM</div><div><br></div><div>-Regards</div><div>Nikhil</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 28, 2016 at 6:55 PM, Nikhil Utane <span dir="ltr"><<a href="mailto:nikhil.subscribed@gmail.com" target="_blank">nikhil.subscribed@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>base1 = 0xA4D000; size1=0x1000;</div><div>memblock_reserve (base1, size1);</div><div><br></div><div>(In a separate static driver code)</div><div>request_mem_region_exclusive (0x00A4D000, 4096, "csSIGILL")<br></div><div><br></div><div>If a driver requests for a memory region, shouldn't the kernel then not allocate it for any other purpose?</div><div><br></div><div>-Regards</div><span class="HOEnZb"><font color="#888888"><div>Nikhil</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 28, 2016 at 3:12 PM, Arun Sudhilal <span dir="ltr"><<a href="mailto:getarunks@gmail.com" target="_blank">getarunks@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Nikhil,<br>
<span><br>
On Wed, Sep 28, 2016 at 2:41 PM, Nikhil Utane<br>
<<a href="mailto:nikhil.subscribed@gmail.com" target="_blank">nikhil.subscribed@gmail.com</a>> wrote:<br>
> Arun,<br>
><br>
> What seems to have done the trick is calling memblock_remove() followed by a<br>
> call to request_mem_region(). This creates a hole which can be confirmed in<br>
> the output of /proc/iomem.<br>
><br>
> Do you see any issue with this approach?<br>
<br>
</span>I really don't know how it works for you. Marking address of a page as<br>
iomem. How buddy allocator ignores this page?<br>
request_mem_region() is a way of managing IO resource memory, to avoid<br>
two drivers using same IO memory. It has not relation with buddy<br>
allocator.<br>
<br>
Can you post code snippet?<br>
<br>
Regards,<br>
Arun<br>
<div><div><br>
><br>
> -Thanks<br>
> Nikhil<br>
><br>
> On Tue, Sep 27, 2016 at 4:14 PM, Arun Sudhilal <<a href="mailto:getarunks@gmail.com" target="_blank">getarunks@gmail.com</a>> wrote:<br>
>><br>
>> Hello Nikhil,<br>
>><br>
>> On Fri, Sep 9, 2016 at 7:01 AM, Nikhil Utane<br>
>> <<a href="mailto:nikhil.subscribed@gmail.com" target="_blank">nikhil.subscribed@gmail.com</a>> wrote:<br>
>> > I want to reserve a physical memory page with a fixed PFN. I do not want<br>
>> > this page to be used by anyone else. I am calling memblock_reserve() to<br>
>> > supposedly reserve the page. I am writing some content into this page.<br>
>> > What<br>
>> > I see is that during some runs the content of this page is modified<br>
>> > (either<br>
>> > fully or sometimes partially). In few runs, I see it as intact. Is it<br>
>> > expected that even after calling memblock_reserve() the kernel can<br>
>> > allocate<br>
>> > this physical page for any other purpose? How is memblock_remove()<br>
>> > different<br>
>> > from memblock_reserve? I tried reading up but didn't see any useful<br>
>> > information. What I understood is memblock_remove will completely remove<br>
>> > from kernel's allocation mechanism. Should I then be using remove<br>
>> > instead of<br>
>> > reserve?<br>
>><br>
>> when a DT entry is added to #reserved-memory node, what<br>
>> drivers/of/fdt.c does is to call memblock_remove() and<br>
>> memblock_reserve().<br>
>> This happens after the memblock driver is initialized but before buddy<br>
>> allocator up. Did you try this approach? This should work for you.<br>
>><br>
>> Only option once the kernel boot is complete is to try out the<br>
>> technique what mm/memory_hotplug.c does while offline memory.<br>
>> isolate_page_range and then migrate.<br>
>><br>
>> Regards,<br>
>> Arun<br>
>><br>
>><br>
>> ><br>
>> > -Thanks<br>
>> > Nikhil<br>
>> ><br>
>> > ______________________________<wbr>_________________<br>
>> > Kernelnewbies mailing list<br>
>> > <a href="mailto:Kernelnewbies@kernelnewbies.org" target="_blank">Kernelnewbies@kernelnewbies.or<wbr>g</a><br>
>> > <a href="https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" rel="noreferrer" target="_blank">https://lists.kernelnewbies.or<wbr>g/mailman/listinfo/kernelnewbi<wbr>es</a><br>
>> ><br>
><br>
><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>