Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1187544imm; Wed, 13 Jun 2018 15:03:10 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKnf+4HRV9BSlYWOClm/yxMk/B0CwcMMUQhtUFMo1sNmqYieOCEuh/XoM+bRbgte2GV+l7E X-Received: by 2002:a17:902:14b:: with SMTP id 69-v6mr7028971plb.184.1528927390142; Wed, 13 Jun 2018 15:03:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528927390; cv=none; d=google.com; s=arc-20160816; b=MWov59tEB+oJFkMcirtq9wwagZGfRcFmNo/hqONXFDyMzifLVLGSW9jTOw0nvPQDYW O2SBsGc9t4kx/jaj3PI81S9KilsdGfs0DrBumNTRhmtTBHn55GS0dkSQ9Rl0o7KFjZ9Q zSksOP3VdcaI4L7UWvx2ykGdr4qnNbtibi0WEqv5xFC4IrkKq7R6UuJYg+wayNdEiM5m RCxYmZJ+vGDr/R2wrl11ZcDqpImB/IzMWW6O5cHYv8R+atZVvBxT95UPrQK8cJ+/HCxe s2AZYdNxMSd9VTvbl5wSDoS/CooQRGPz7saPHF9ZocSdQKcWVUvnc1i+0VWxMNdrlTAF zjdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=jT5Y1CEEGwtwJJvhXEbqLmi76nFK7XHPkBaGI7eDEWc=; b=PkBAsEPKtLGDK0dur3wDyjAKBMF3Cwoph+N00znUU0PXkNWZPYXUbqXENhKx9/JrhE y3MqqHTcxiCBeXBYV3ZzoEYKh1i+x0PeHpN7yct7VfuP8IgPtoJQVyNXwZpA4IWzeTfK 9MOAQlqHctN8S3b0yJwSyyx9rYURoVfnBHJI5Tg8xFPSkV8cFPGdTmwFUAl5C2MBAAim UjHXq5rKexKCFiEx/Duzi8E2V9maKs4k3U4jcKcW0+fn+eQ8ZuIhHEEfqrabLHnPsNJb vih91w8S+cpWULz+YlMSwJ+w44OiqdREFjrfQEzYaYTXNF8hrnZFZDKRPv/HUHhNrGRz 6p+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b="GZ/rn4y7"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t194-v6si3093402pgc.327.2018.06.13.15.02.53; Wed, 13 Jun 2018 15:03:10 -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; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b="GZ/rn4y7"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754571AbeFMWCZ (ORCPT + 99 others); Wed, 13 Jun 2018 18:02:25 -0400 Received: from casper.infradead.org ([85.118.1.10]:52334 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754526AbeFMWCY (ORCPT ); Wed, 13 Jun 2018 18:02:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:MIME-Version:References: Message-ID:In-Reply-To:Subject:cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=jT5Y1CEEGwtwJJvhXEbqLmi76nFK7XHPkBaGI7eDEWc=; b=GZ/rn4y71ObLdsjtSDdn+NQ0Z B72HP1vkCmrWDLhEQTKRdOkvRzR3xr6gFdPAM+RXjNvhQLRiM5+HIfufE7GCmSXdlySV0D6azqnIC VyW+6+/poEvWDNgDcS8s8okbFjo71C2breRX01xK6MhpD4iIg75G3jL9RNfFKTphmmL4dA/pgH/Jy EqFW3vEB+t9wdC89UufLfIQmp2F6Z2R3z/aqNaJsPW2loTMfO8DsNPzEopTw1wqF5GsSO0Vv0DF7G JniXpNT5ZvYI6C7P6asrlU3R5xutob5CaAqB0/JU0He/4dT9Txreu/9nE/LR/1y5XHNx48pLwYYK5 cF5QShxBw==; Received: from jsimmons (helo=localhost) by casper.infradead.org with local-esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fTDqK-0004L6-DL; Wed, 13 Jun 2018 22:02:18 +0000 Date: Wed, 13 Jun 2018 23:02:16 +0100 (BST) From: James Simmons To: NeilBrown cc: Andreas Dilger , Oleg Drokin , Linux Kernel Mailing List , Lustre Development List , Doug Oucharek , Amir Shehata Subject: Re: [PATCH v2 01/25] staging: lustre: libcfs: restore UMP handling In-Reply-To: <87muwiuiuz.fsf@notabene.neil.brown.name> Message-ID: References: <1527603725-30560-1-git-send-email-jsimmons@infradead.org> <1527603725-30560-2-git-send-email-jsimmons@infradead.org> <87muwiuiuz.fsf@notabene.neil.brown.name> User-Agent: Alpine 2.21 (LFD 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180613_230216_465301_AF0E0686 X-CRM114-Status: GOOD ( 17.92 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.1 on casper.infradead.org summary: Content analysis details: (-0.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 NO_RELAYS Informational: message was not relayed via SMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > With the cleanup of the libcfs SMP handling all UMP handling > > was removed. In the process now various NULL pointers and > > empty fields are return in the UMP case which causes lustre > > to crash hard. Restore the proper UMP handling so Lustre can > > properly function. > > Can't we just get lustre to handle the NULL pointer? > Is most cases, the pointer is accessed through an accessor function, and > on !CONFIG_SMP, that can be a static inline that doesn't even look at > the pointer. Lots of NULL pointer checks for a structure allocated at libcfs module start and only cleaned up at libcfs removal is not a clean approach. So I have thought about it and I have to ask why allocate a global struct cfs_cpu_table. It could be made static and fill it in which would avoid the whole NULL pointer issue. Plus for the UMP case why allocate a new cfs_cpu_table with cfs_cpt_table_alloc() which is exactly like the default UMP cfs_cpu_table. Instead we could just return the pointer to the static default cfs_cpt_tab every time. We still have the NULL ctb_cpumask field to deal with. Does that sound like a better solution to you? Doug what do you think? > I really think this is a step backwards. If you can identify specific > problems caused by the current code, I'm sure we can fix them. > > > > > Signed-off-by: James Simmons > > Signed-off-by: Amir Shehata > > Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7734 > > This bug doesn't seem to mention this patch at all > > > Reviewed-on: http://review.whamcloud.com/18916 > > Nor does this review. Yeah its mutated so much from what is in the Intel tree. I do believe it was the last patch to touch this.