Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1957728imu; Tue, 6 Nov 2018 07:00:33 -0800 (PST) X-Google-Smtp-Source: AJdET5eVk37RLMKOky3jAvqtkfZ1vKT18ZJgksGQa/EEtldFebjafh1XWWhI25k0/qOwUVUwaoYm X-Received: by 2002:a65:50c3:: with SMTP id s3-v6mr23535720pgp.355.1541516433140; Tue, 06 Nov 2018 07:00:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541516433; cv=none; d=google.com; s=arc-20160816; b=hpVXAP+FGj0BIfiBs8S/4bJGSjOSuTNYaGjqo2pG27FSWtZHxE6ZMa/ohEd7nw20hF iXtAvl8vJm5LkiuIfcOhnOsGhvrwWrnEhUjA6EAlCQtOmsH9zRaw2aOWzPWDYG5p7n8S yYgln/tHj1M5wbpL5K6Q9DrH1lQndtJjd1gijfZDMItyfn+sQFDWr6FSwgTpA8OdHu0Y qT3odn+2eDzQAmFR2j7sPaWIIr6akAmgJNq/xoPmeHKcXXKm3aH7/MJzXT3Gx1JgjYfn 5v4LkxpClgyPiajMpwumP26wc8EGsdd9exwF6sBt/FsSRI1NillopRl0H1y7azqpd/kM d2+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=8mvrppLPNyUmK9QoeGegp7B8KyARBY7NMFJppKuMgJ8=; b=EKAiSxNf71FlwIsSgFR+XxQJJaNR5G04wmJa3SdiFuS0Qos0sWl6swFj1a6S5Z4INp BspKhEQJQDuMKTYQmKZ8lHltq2W/mpgZ7nvwbADDFI7+r6CxwpNG8DevRTGcKQLJGejm 1NeXb3o2PI/Vh5mMAWPoUKAa5zWMzcd9TNqyXMfi/dD0whgEWx5NE2xV9D3rzl/XPXwd BkT0+0NrzrtjTXIHhqR4qLeHbGtO3WK1tiuFPOmKjXICUNwS5dLFz77In4vK0K/LOdda r9vJmp+GpR7uXMqKKjDMdnXRwu5s/HyPp0cwBsBqEjF12EqYy5R10e4tBOMD4iO/b8f5 uavQ== 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z14-v6si36914958pfc.11.2018.11.06.07.00.14; Tue, 06 Nov 2018 07:00:33 -0800 (PST) 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388925AbeKGAZD (ORCPT + 99 others); Tue, 6 Nov 2018 19:25:03 -0500 Received: from mail-oi1-f196.google.com ([209.85.167.196]:38058 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388800AbeKGAZD (ORCPT ); Tue, 6 Nov 2018 19:25:03 -0500 Received: by mail-oi1-f196.google.com with SMTP id v83-v6so10931139oia.5 for ; Tue, 06 Nov 2018 06:59:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8mvrppLPNyUmK9QoeGegp7B8KyARBY7NMFJppKuMgJ8=; b=iX4qZQ/5KrMVGU0MG+jiPOA4oS2GgjUQ732cPLU733Tb5ERM4a42g258Kc4hl8P0o+ 4UWpb8TKZpNcaAoPZE95cnFyfmP15R6SXfTgD5p7zSFQ2+SPfAiK3OQx+iJXQtgSbJ84 SO90IP6uLBYzPA333TImdYwQsqIKyE1KlsQkaSfEvTz7ClTQjNTPb8pLUYtuOg6aFKK1 NK615O46c6Vp2a6iubpok6kolmXlPMRA6Fw/C4HgsRvpp1vbTppTwLck4QdR2jEGZOAU h2wOcv6bPRqZUBIxkYKHQFZI6q8KLmFcoZA0AfZppR4UKo5av/Cl+q+47LgcXjL3ogj2 chhg== X-Gm-Message-State: AGRZ1gICKR4SuQS3eCSj+EQTswfaAq8qmTFMsdV7XKxeVAHd/2ibb1zl +Soo3sDej+p2mXYpisM4n5MqNUtiIsrPaoc1w/c= X-Received: by 2002:aca:f3d4:: with SMTP id r203-v6mr14225673oih.95.1541516366654; Tue, 06 Nov 2018 06:59:26 -0800 (PST) MIME-Version: 1.0 References: <20181106134630.29591-1-smuchun@gmail.com> In-Reply-To: From: "Rafael J. Wysocki" Date: Tue, 6 Nov 2018 15:59:15 +0100 Message-ID: Subject: Re: [PATCH] driver core: Add branch prediction hints in really_probe() To: smuchun@gmail.com Cc: "Rafael J. Wysocki" , Greg Kroah-Hartman , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 6, 2018 at 3:43 PM Muchun Song wrote: > > Hi Rafael, > > If we want the driver core to test driver remove functions, we can > enable CONFIG_DEBUG_TEST_DRIVER_REMOVE. This option is > just for testing it. So, in most cases, the option is disabled and the if > condition is false. So I think we can add an unlikely() to it. Yes, it can be added there, but does it really need to be added? If the conditions are false all the time, the branch predictor in the processor should be able to deal with it just fine. And if they are false already at build time, the compiler should just optimize them away.