mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Finn Thain <fthain@telegraphics.com.au>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Linux/m68k <linux-m68k@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 11/14] nubus: Repopulate /proc/bus/nubus/s/
Date: Tue, 14 Nov 2017 11:21:29 +1100 (AEDT)	[thread overview]
Message-ID: <alpine.LNX.2.00.1711141020480.3@nippy.intranet> (raw)
In-Reply-To: <CAMuHMdUCWzmGNyPp0OV-XFvtyTcxCgW-eLKdxnkd0gg_rGToVw@mail.gmail.com>

On Mon, 13 Nov 2017, Geert Uytterhoeven wrote:

> On Sat, Nov 11, 2017 at 7:12 AM, Finn Thain <fthain@telegraphics.com.au> 
> wrote:
> 
> > ---
> >  drivers/nubus/nubus.c | 117 +++++++++++++++++++++++++++-------
> >  drivers/nubus/proc.c  | 170 +++++++++++++++++++++++++++++++++++++++++++++++---
> >  include/linux/nubus.h |  35 ++++++++++-
> >  3 files changed, 288 insertions(+), 34 deletions(-)
> 
> Wow, that's much more code added than was removed by "[PATCH 10/14] 
> nubus: Depopulate /proc/bus/nubus/s/":
> 
>  drivers/nubus/proc.c  | 100 --------------------------------------------------
>  include/linux/nubus.h |   1 -
>  2 files changed, 101 deletions(-)
> 

You're right. The new code includes two structs file_operations and there 
is probably some redundancy in this arrangement. I'll see if it can be 
done with one set of file operations methods.

> How much memory is saved by not using the stored representation of slot 
> resource data?
> 

That question might be expressed as "how much RAM would be wasted by 
duplicating the contents of the slot ROM resources in RAM?".

Either way, the answer is hard to estimate because we don't know which 
resources will be accessed via procfs. (Resource IDs that are not known to 
nubus.c are omitted already though they may end up being needed.)

The few resources needed by sysfs are already stored in RAM at a cost of a 
tens of bytes per board. The resources required by drivers are read from 
ROM as needed and I think that's the simplest and cheapest approach for 
procfs too.

> BTW, should 10 and 11 be combined, to avoid a regression during 
> bisection?
> 

Right. There isn't any reason to separate them now. I'll squash them 
together.

Thanks for reviewing.

-- 

> Gr{oetje,eeting}s,
> 
>                         Geert
> 

  reply	other threads:[~2017-11-14  0:21 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-11  6:12 [PATCH 00/14] Modernization and fixes for NuBus subsystem Finn Thain
2017-11-11  6:12 ` [PATCH 07/14] nubus: Remove redundant code Finn Thain
2017-11-11  6:12 ` [PATCH 04/14] nubus: Fix log spam Finn Thain
2017-11-11 15:04   ` Joe Perches
2017-11-11 23:47     ` Finn Thain
2017-11-12  0:08       ` Joe Perches
2017-11-11  6:12 ` [PATCH 09/14] nubus: Don't needlessly unpack vidname and driver resources Finn Thain
2017-11-11  6:12 ` [PATCH 01/14] nubus: Avoid array underflow and overflow Finn Thain
2017-11-11  6:12 ` [PATCH 06/14] nubus: Call proc_mkdir() not more than once per slot Finn Thain
2017-11-11  6:12 ` [PATCH 11/14] nubus: Repopulate /proc/bus/nubus/s/ Finn Thain
2017-11-13  8:56   ` Geert Uytterhoeven
2017-11-14  0:21     ` Finn Thain [this message]
2017-11-11  6:12 ` [PATCH 05/14] nubus: Validate slot resource IDs Finn Thain
2017-11-11  6:12 ` [PATCH 10/14] nubus: Depopulate /proc/bus/nubus/s/ Finn Thain
2017-11-11  6:12 ` [PATCH 03/14] nubus: Use static functions where possible Finn Thain
2017-11-11  6:12 ` [PATCH 02/14] nubus: Fix up header split Finn Thain
2017-11-11  6:12 ` [PATCH 08/14] nubus: Clean up whitespace Finn Thain
2017-11-11  6:12 ` [PATCH 14/14] nubus: Add support for the driver model Finn Thain
2017-11-11  8:45   ` Greg Kroah-Hartman
2017-11-11  8:46     ` Greg Kroah-Hartman
2017-11-12  3:52       ` Finn Thain
2017-11-11  6:12 ` [PATCH 13/14] nubus: Add expansion_type values for various Mac models Finn Thain
2017-11-11  6:12 ` [PATCH 12/14] nubus: Rename struct nubus_dev Finn Thain
2017-11-13  8:57   ` Geert Uytterhoeven
2017-11-14  0:18     ` Finn Thain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LNX.2.00.1711141020480.3@nippy.intranet \
    --to=fthain@telegraphics.com.au \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®