netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Amir Vadai <amirv@mellanox.com>
Cc: andi@firstfloor.org, David Miller <davem@davemloft.net>,
	akpm@linux-foundation.org, netdev@vger.kernel.org,
	ogerlitz@mellanox.com, yevgenyp@mellanox.com
Subject: Re: [PATCH net-next 0/3] Make is_kdump_kernel() accessible from modules
Date: Thu, 31 Jul 2014 09:07:56 -0400	[thread overview]
Message-ID: <20140731130756.GE11063@redhat.com> (raw)
In-Reply-To: <53D9E789.4070607@mellanox.com>

On Thu, Jul 31, 2014 at 09:51:53AM +0300, Amir Vadai wrote:
> On 7/30/2014 3:35 PM, Vivek Goyal wrote:
> > On Tue, Jul 29, 2014 at 04:46:32PM -0700, David Miller wrote:
> >> From: Vivek Goyal <vgoyal@redhat.com>
> >> Date: Mon, 28 Jul 2014 08:26:09 -0400
> >>
> >>> On Sun, Jul 27, 2014 at 05:48:32PM -0700, Andi Kleen wrote:
> >>>> Amir Vadai <amirv@mellanox.com> writes:
> >>>>
> >>>>> Hi,
> >>>>>
> >>>>> I'm sending this patchset to net-next because it touches a commit [1] that was
> >>>>> applied lately to net-next.
> >>>>
> >>>> It would be better to have a generic function for "run with small
> >>>> memory", that can be also triggered in other ways, e.g. a sysctl or
> >>>> a boot opion, with kdump just another user.
> >>>>
> >>>> There are low memory cases which are not kdump.
> >>>
> >>> I am fine with a boot option to suggest low memory profile and kdump
> >>> scripts can be modified to automatically append that command line option
> >>> to second kernel.
> >>
> >> I'm therefore going to assume that this patch series will be updated when the
> >> new facility is added.
> > 
> > Hi Amir,
> > 
> > Can you please add a new kernel parameter say, "low_memory_env" and change
> > rest of the patches to make use of this kernel parameter and repost.
> Sure.
> 
> I thought about it some more in the last day - aren't we making life too
> complicated? I think the trigger that my driver (and maybe other) would
> like to see is is_kdump_kernel and not is_low_mem - in mlx4_en we need
> two assumptions that derive from is_kdump_kernel():
> 1. We are low on memory
> 2. This is kdump environment, and therefore we can assume that not many
> vlans be used, no Infiniband support, performance can be compromised etc.
> Just saying low memory might be less accurate - and will add some
> complexity with the user space scripts (I know it is not very
> complicated - but what are the benefits?)

If there are performance implications of low memory profile, then user
needs to live with it. Otherwise they should not use low_memory_env
boot option to begin with.

> 
> If I didn't convince you :) - I have a small technical question:
> I was looking for a place to put the __setup() and the low_mem_env
> declaration and couldn't decide by myself - do you have a suggestion for
> a proper c file and h file?

As it is a boot option which will be applicable across arches, I think
this can be implemented along the lines of "reset_devices". Look at
init/main.c

I think a bigger problem is that low memory is a relative term. And
drivers writers will be thinking that what does low memory mean and
how much memory should they pre-allocate.

Is 256MB a low memory or will 2GB be considered a low memory. And
later there might be a discussion that a preallocation of memory which
suits 256MB is not the perfect fit for 2GB memory.

I am more concerned about it. By using is_kernel_kdump() we pretty
much made this profile custom for kdump requirements and other
usages can define their own boot options to meet their requirements.

Andi, what do you think about continuing with is_kernel_kdump() for
this case. Defining a new boot option low_memory_evn will work for
now but I got a feeling we will have conflicts later that what does
low memory mean and how that impacts the choice of profile.
IOW, low_memory_env sounds very generic and little vague.

Thanks
Vivek

  reply	other threads:[~2014-07-31 13:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-27 14:59 [PATCH net-next 0/3] Make is_kdump_kernel() accessible from modules Amir Vadai
2014-07-27 14:59 ` [PATCH net-next 1/3] crash_dump: " Amir Vadai
2014-07-27 14:59 ` [PATCH net-next 2/3] net/mlx4: Use is_kdump_kernel() to detect kdump kernel Amir Vadai
2014-07-27 14:59 ` [PATCH net-next 3/3] net/bnx2x: " Amir Vadai
2014-07-28  0:48 ` [PATCH net-next 0/3] Make is_kdump_kernel() accessible from modules Andi Kleen
2014-07-28 12:26   ` Vivek Goyal
2014-07-29 23:46     ` David Miller
2014-07-30 12:35       ` Vivek Goyal
2014-07-31  6:51         ` Amir Vadai
2014-07-31 13:07           ` Vivek Goyal [this message]
2014-07-31 19:22             ` David Miller
2014-08-01 12:44               ` Vivek Goyal
2014-08-06  8:10               ` Amir Vadai

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=20140731130756.GE11063@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=amirv@mellanox.com \
    --cc=andi@firstfloor.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=yevgenyp@mellanox.com \
    /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;
as well as URLs for NNTP newsgroup(s).