I think that racism will exist as long as there are social injustices, major differences between rich and poor, hardships and perceived injustices for large groups of people. Because it is always too easy to cast the blame for the problems upon those people who are not like us, the others. If the others are perceived as coming better out than us, this always leads to racist outcry (Surely "they" are criminal or get benefits "we" don't get...). We see this all the time in Europe and America where the immigrants gets the blame for all problems in society.
On the other hand, when the class differences are small and most people get what they need, then the level of racism is low.