I think displaying your nationality on your profile page should be an option, not a necessity. Some people would rather keep their location private, whether they fear racial backlash, or simply because of preference, and that decision should be respected no matter what they choose to do. The suggestion has both positive and negative attributes, but the latter can be marginalized by allowing a user to tweak it accordingly.
Of course, this doesn't entirely prevent discrimination, but hopefully it lessens its impact, and therefore makes it easier to track those partaking in it so they may be dealt with a pertinent punishment.