<div dir="ltr">Dear All<div><br></div><div>Thanks for your help. I could activate zram0, after doing the mkswap on the device. </div><div><br></div><div>These all steps i followed,</div><div><br></div><div>echo 50M > /sys/block/zram0/disksize</div>
<div>mkswap /dev/block/zram0</div><div>swapon -p 100 /dev/block/zram0</div><div><br></div><div>after that, i saw my swap partition is being used. From the stats i saw 44MB RAM data is compressed into 14MB.</div><div><br>
</div>
<div>But i have a doubt, When i reserve 50M RAM for swap partition, is it like a carve out memory?</div><div>i mean Kernel cant use this anymore?</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br>
<div class="gmail_quote">
On Sat, May 24, 2014 at 12:31 PM, Chen, Yiqun <span dir="ltr"><<a href="mailto:feedingfranzy@gmail.com" target="_blank">feedingfranzy@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Um, well that sounds pretty weird.<br>
Have you checked that you've loaded that module? If so, I guess there's<br>
something wrong with modprobe stuff that it didn't mknod for zram, so<br>
try mknod for zram manually.<br>
Check your /dev/block/ directory for the device numbers. On my box it<br>
was 254:0 254:1 which were mapped to my zram0 and zram1 respectively.<br>
Then:<br>
mknod /dev/zram0 b 254 0<br>
It should create a suitable /dev/zram* for you. Then try mkswap-swapon<br>
procedure as others suggest. Please notice that -p argument for swapon is somehow<br>
necessary since on my gentoo box the priority of swap devices is set minus<br>
by default. So your system may not use the zram swap at all even if<br>
you've successfully create the zram device for it.<br>
Please let my know if it still doesn't work :-)<br>
<div class="">On Fri, May 23, 2014 at 02:51:39PM +0530, sandeep kumar wrote:<br>
> >>In my system /dev/zram0 is not present but sys/block/zram0 is present.<br>
> thats why i m having this doubt<br>
> just now i found that we have zram0 in /dev/block/zram0<br>
> i tried the command you told,<br>
><br>
</div>> *root@kleoslte:/ # swapon -p 100 /dev/block/zram0*<br>
> *swapon -p 100 /dev/block/zram0*<br>
> *swapon failed for /dev/block/zram0*<br>
<div class="HOEnZb"><div class="h5">><br>
> is there anything else that i can try?<br>
><br>
><br>
><br>
> On Fri, May 23, 2014 at 2:18 PM, sandeep kumar <<a href="mailto:coolsandyforyou@gmail.com">coolsandyforyou@gmail.com</a>>wrote:<br>
><br>
> > Dear Anders<br>
> ><br>
> > >Yes, zram is activated, otherwise you wouldn't have had zram0 created.<br>
> ><br>
> > >Though you might not be using it...<br>
> > >If you want to use it for swap, you'll have to run `swapon -p 100<br>
> > /dev/zram0`.<br>
> > >Well, '-p 100' isn't necessary, it's just to set the swap priority.<br>
> ><br>
> > In my system /dev/zram0 is not present but sys/block/zram0 is present.<br>
> > thats why i m having this doubt<br>
> ><br>
> > thanks<br>
> > sandeep<br>
> ><br>
> ><br>
> > On Thu, May 22, 2014 at 4:56 PM, Anders Darander <<br>
> > <a href="mailto:anders.darander@gmail.com">anders.darander@gmail.com</a>> wrote:<br>
> ><br>
> >> On 22 May 2014 12:58, sandeep kumar <<a href="mailto:coolsandyforyou@gmail.com">coolsandyforyou@gmail.com</a>> wrote:<br>
> >> > Dear All,<br>
> >> ><br>
> >> > we are trying to make use of zramfs. In our android based board,<br>
> >> > we are seeing this output,<br>
> >> ><br>
> >> > root@sandeep:/sys/block/zram0 # ls<br>
> >><br>
> >> ><br>
> >> > Does this mean zram is activated ?<br>
> >><br>
> >> Yes, zram is activated, otherwise you wouldn't have had zram0 created.<br>
> >><br>
> >> Though you might not be using it...<br>
> >> If you want to use it for swap, you'll have to run `swapon -p 100<br>
> >> /dev/zram0`.<br>
> >> Well, '-p 100' isn't necessary, it's just to set the swap priority.<br>
> >><br>
> >> > we are trying to do the operation to set disk size,<br>
> >> > echo $((50*1024*1024)) > /sys/block/zram0/disksize<br>
> >><br>
> >> This should have set the size of zram0.<br>
> >><br>
> >> Cheers,<br>
> >> Anders<br>
> >><br>
> >> --<br>
> >> Anders Darander<br>
> >> EPO guidelines 1978: "If the contribution to the known art resides<br>
> >> solely in a computer program then the subject matter is not<br>
> >> patentable in whatever manner it may be presented in the claims."<br>
> >><br>
> ><br>
> ><br>
> ><br>
> > --<br>
> > With regards,<br>
> > Sandeep Kumar Anantapalli,<br>
> ><br>
><br>
><br>
><br>
> --<br>
> With regards,<br>
> Sandeep Kumar Anantapalli,<br>
<br>
</div></div><div class="HOEnZb"><div class="h5">> _______________________________________________<br>
> Kernelnewbies mailing list<br>
> <a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
> <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Best regards<br>
Chen, Yiqun<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>With regards,<br>Sandeep Kumar Anantapalli,<br>
</div>