Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1310240imm; Fri, 29 Jun 2018 15:44:16 -0700 (PDT) X-Google-Smtp-Source: AAOMgpekjNUcjA9AVVEdqlj5o63n/747Y56AlN+rK095+Gudj6t7U4HALbISBk+urdtHOZNlsymJ X-Received: by 2002:a62:c16:: with SMTP id u22-v6mr16218365pfi.177.1530312256763; Fri, 29 Jun 2018 15:44:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530312256; cv=none; d=google.com; s=arc-20160816; b=KgRWHAtBg5m1QSlB01leh+rij//Ek2qjj2Mc9BQqz/ZY7W7GqmMzG5CU6+2Obwau3N 6RuhAitPOLTBj4UlBEl0TEBdshCNyeXoOJ59epre+DHi5yC0X65oyIV6vCFRTicMMf8W WEETJ/kWAyBNyQfiXFEh06X1ZNhFxGX7E21HhwFYwGAH7g/BlK5KD75jZvOUnZ9FefbZ lx8WFq3VqbaNN/72F/ll3IQ2Wpe3wfc/8/UG/JfOuvfyvEqjTRIvaHDiobcoz89HT+YK lHa2/QtnIBlMxs5mMjT0ONVkkaC2vsmcXV1R5juTT9HghDXntA6U/qWIN04T+L0/PnNu fiPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=/UQu5RDnmneNxuZPxjFLD+63tyzXRGFrzsl3sb4Dm2U=; b=O60bKIx6bKgYtZMCjrtFy5Vi172M65aMENVitG0PxKu5pyZ1Dh9Vh1jUvBwaru4ZYg 5P/PGIPryacwVE8KLT7oadoWGeMLRMVQtmV3nAkw13ceO9Vu7h0ClfLZ82bP9ozTzp7I wXLQGMlKDkUitY9dxN4epdWQsvKnXiqf+A4SP7qtLtFvDYEkE7s6SsndOUp6pHFhJ50g HKpIWeG5uR5B8eZdNF/bRLIgxPTSiNHhB9ZWgHvmaAgC13ieFxBDwprs5Wmfd13l3XwA 57dyrQrG6eoSJXatBben0v8xPOyHVmloT1u+v3EzpLvn9z9eEnnktRMsvKMq/CvdKc+i HjRQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k6-v6si7201089pgp.127.2018.06.29.15.44.02; Fri, 29 Jun 2018 15:44:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935329AbeF2VLM (ORCPT + 99 others); Fri, 29 Jun 2018 17:11:12 -0400 Received: from mga05.intel.com ([192.55.52.43]:11349 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932345AbeF2VLL (ORCPT ); Fri, 29 Jun 2018 17:11:11 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Jun 2018 14:11:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,287,1526367600"; d="scan'208";a="51568474" Received: from romley-ivt3.sc.intel.com ([172.25.110.60]) by fmsmga008.fm.intel.com with ESMTP; 29 Jun 2018 14:11:10 -0700 Date: Fri, 29 Jun 2018 14:10:30 -0700 From: Fenghua Yu To: Dave Hansen Cc: Fenghua Yu , Thomas Gleixner , Ingo Molnar , H Peter Anvin , Ashok Raj , Alan Cox , Peter Zijlstra , Rafael Wysocki , Tony Luck , Ravi V Shankar , linux-kernel , x86 Subject: Re: [PATCH v2 2/4] x86/split_lock: Align x86_capability to unsigned long to avoid split locked access Message-ID: <20180629211030.GB68178@romley-ivt3.sc.intel.com> References: <1530282807-66555-1-git-send-email-fenghua.yu@intel.com> <1530282807-66555-3-git-send-email-fenghua.yu@intel.com> <20180629190346.GO18979@romley-ivt3.sc.intel.com> <20180629203844.GA68178@romley-ivt3.sc.intel.com> <8fdfb671-f223-163b-12cd-3c97d94f91b4@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8fdfb671-f223-163b-12cd-3c97d94f91b4@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 29, 2018 at 01:48:45PM -0700, Dave Hansen wrote: > On 06/29/2018 01:38 PM, Fenghua Yu wrote: > > How to handle data that is used in generic code which can be used on > > non-Intel platform? For exmple, if I do this change for struct efi in > > include/linux/efi.h because set_bit() sets bits in efi.flags: > > - unsigned long flags; > > + unsigned long flags __aligned(unsigned long); > > } efi; > > > > People may argue that the alignment unnecessarily increases size of 'efi' > > on non-Intel platform which doesn't have split lock issue. Do we care this > > argument? > > Unaligned memory accesses are bad, pretty much universally. This is a > general good practice that we should have been doing anyway. Let folks > complain. Don't let it stop you. > > Also, look at the size of that structure. Look at how many pointers it > has. Do you think *anyone* is going to complain about an extra 4 bytes > in a 400-byte structure? > > > Another question, there will be a bunch of one-line changes for > > the alignment (i.e. adding __aligned(unsigned long)) in various files. > > Will the changes be put in one big patch or in separate one-liner patches? > > Just group them logically. Sure. Thanks. -Fenghua