Re: One more question on alignment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Sat, Aug 6, 2011 at 12:37 PM, Daniel Baluta <daniel.baluta@xxxxxxxxx> wrote:
On Sat, Aug 6, 2011 at 10:17 PM, subin gangadharan
<subingangadharan@xxxxxxxxx> wrote:
> Hi,
> This is a text excerpt from the article [1].
> Below paragraph I didn't understand quite well.Mainly in bold letters.Could
> anybody please explain how this will lead to an infinite loop.

It seems self-explanatory. Most atomic ops are written to retry upon a failed
store, and  on PowerPC an atomic store to an unaligned address always fails,
thus the processor will infinitely try to store the value, without having
the chance to fix the unaligned access (as would have happened if an exception
was thrown).

>
> Unfortunately, the PowerPC does not throw an exception when atomically
> storing to an unaligned address. Instead, the store simply always fails.
> This is bad because most atomic functions are written to retry upon a failed
> store, under the assumption they were preempted. These two circumstances
> combine to where your program will go into an infinite loop if you attempt
> to atomically store to an unaligned address. Oops.

thanks,
Daniel.
Thanks Daniel,
My bad, I was trying to connect the page fault explained before that paragraph and this one.
Hence I got confused,again thanks for clarifying it. 



--
With Regards
Subin Gangadharan

Everything should be made as simple as possible,but not simpler.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux