Re: [PATCH RFC] mm/memory_hotplug: Introduce memory block types

2018-10-03 Thread Michal Hocko
On Wed 03-10-18 19:00:29, David Hildenbrand wrote: [...] > Let me rephrase: You state that user space has to make the decision and > that user should be able to set/reconfigure rules. That is perfectly fine. > > But then we should give user space access to sufficient information to > make a decisi

Re: [PATCH RFC] mm/memory_hotplug: Introduce memory block types

2018-10-03 Thread Michal Hocko
On Wed 03-10-18 19:14:05, David Hildenbrand wrote: > On 03/10/2018 16:34, Vitaly Kuznetsov wrote: > > Dave Hansen writes: > > > >> On 10/03/2018 06:52 AM, Vitaly Kuznetsov wrote: > >>> It is more than just memmaps (e.g. forking udev process doing memory > >>> onlining also needs memory) but yes,

[PATCH] staging: emxx_udc: Remove unused device_desc declaration

2018-10-03 Thread Nathan Chancellor
Clang warns: drivers/staging/emxx_udc/emxx_udc.c:1373:37: warning: variable 'device_desc' is not needed and will not be emitted [-Wunneeded-internal-declaration] static struct usb_device_descriptor device_desc = { ^ 1 warning generated. This definition hasn't b

[PATCH] staging: rtl8723bs: Remove unnecessary parentheses and dead commented code

2018-10-03 Thread Nathan Chancellor
Clang warns when multiple pairs of parentheses are used for a single conditional statement. drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:3351:20: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] The commented code is pointless since _HW_STATE_AP_ is handled r

[PATCH] staging: rtlwifi: Remove unnecessary parentheses

2018-10-03 Thread Nathan Chancellor
Clang warns when multiple pairs of parentheses are used for a single conditional statement. drivers/staging/rtlwifi/phydm/phydm_adc_sampling.c:558:33: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] } else if ((is_enable_la_mode == 1)) {

Re: [PATCH 2/3] staging: rtl8188eu: cleanup array declaration - style

2018-10-03 Thread Joe Perches
On Wed, 2018-10-03 at 22:43 +0200, Michael Straube wrote: > Cleanup array declaration to clear two 'line over 80 characters' > checkpatch warnings and improve readability. [] > diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c > b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c [] > @@ -383

Re: [patch 00/11] x86/vdso: Cleanups, simmplifications and CLOCK_TAI support

2018-10-03 Thread Andy Lutomirski
On Wed, Oct 3, 2018 at 12:01 PM Marcelo Tosatti wrote: > > On Tue, Oct 02, 2018 at 10:15:49PM -0700, Andy Lutomirski wrote: > > Hi Vitaly, Paolo, Radim, etc., > > > > On Fri, Sep 14, 2018 at 5:52 AM Thomas Gleixner wrote: > > > > > > Matt attempted to add CLOCK_TAI support to the VDSO clock_getti

Re: [PATCH 1/3] staging: rtl8188eu: fix line over 80 characters - style

2018-10-03 Thread Joe Perches
On Wed, 2018-10-03 at 22:43 +0200, Michael Straube wrote: > Line break array declaration to clear a 'line over 80 characters' > checkpatch warning. For consistency replace 0x0 with 0x00. [] > diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c > b/drivers/staging/rtl8188eu/core/rtw_mlme_ext

[PATCH v4 12/13] staging: comedi: ni_660x: clean up pfi routing

2018-10-03 Thread Spencer E. Olson
Cleans up the pfi routing code to make it easier to follow, read, and also to prepare to use this cleaned up code for enabling the device-global routing interface for ni_660x devices. Signed-off-by: Spencer E. Olson --- drivers/staging/comedi/drivers/ni_660x.c | 72 ++-- 1 fi

[PATCH v4 09/13] staging: comedi: tio: implement global tio/ctr routing

2018-10-03 Thread Spencer E. Olson
Adds ability to use device-global names in command args, in particular cmd->start_arg (for NI_CtrArmStartTrigger), and cmd->scan_begin_arg or cmd->convert_arg (either is used to specify NI_CtrGate, with preference given to cmd->scan_begin_arg, if it is set). The actual arguments of cmd->start_arg

[PATCH v4 13/13] staging: comedi: ni_660x: add device-global routing

2018-10-03 Thread Spencer E. Olson
Provides the device-global routing interface for ni_660x devices. Using the device-global names in comedi_cmd structures for commands was already supported through the ni_tio module. Signed-off-by: Spencer E. Olson --- drivers/staging/comedi/drivers/ni_660x.c | 265 +++ 1 fi

[PATCH v4 07/13] staging: comedi: ni_mio_common: implement global pfi, rtsi routing

2018-10-03 Thread Spencer E. Olson
Implement device-global config interface for ni_mio devices. In particular, this patch implements: INSN_DEVICE_CONFIG_TEST_ROUTE, INSN_DEVICE_CONFIG_CONNECT_ROUTE, INSN_DEVICE_CONFIG_DISCONNECT_ROUTE, INSN_DEVICE_CONFIG_GET_ROUTES for the ni mio devices. This means that the new abstracted signal/

[PATCH v4 11/13] staging: comedi: ni_660x: Add NI PCI-6608 to list of supported devices

2018-10-03 Thread Spencer E. Olson
Previously, only the PXI version of the NI-6608 board was supported. This change adds support for the PCI version as well. Signed-off-by: Spencer E. Olson --- drivers/staging/comedi/drivers/ni_660x.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/staging/come

[PATCH v4 08/13] staging: comedi: ni_mio_common: implement output selection of GPFO_{0, 1}

2018-10-03 Thread Spencer E. Olson
Implement the ability to route various signals to NI_CtrOut(x) pin. This pin is also known as GPFO_{0,1} in the DAQ STC. Signed-off-by: Spencer E. Olson --- .../staging/comedi/drivers/ni_mio_common.c| 106 ++ drivers/staging/comedi/drivers/ni_stc.h | 6 +- 2 files ch

[PATCH v4 05/13] staging: comedi: add interface to ni routing table information

2018-10-03 Thread Spencer E. Olson
Adds interface and associated unittests for accessing/looking-up/validating the new ni routing table information. Signed-off-by: Spencer E. Olson --- Patch revisions: - [PATCH v3 05/13]: Simplify and clean up prototypes of functions for use with besearch. - [PATCH v2 05/13]: Tweak Makef

[PATCH v4 10/13] staging: comedi: ni_mio_common: create device-global access to tio

2018-10-03 Thread Spencer E. Olson
Adds tio sub-devices of ni_mio_common supported hardware to the implementation of test_route, connect_route, disconnect_route. This change delegates the actual functionality to the ni_tio module. Signed-off-by: Spencer E. Olson --- drivers/staging/comedi/drivers/ni_mio_common.c | 11 +++

[PATCH v4 06/13] staging: comedi: ni_mio_common: implement new routing for TRIG_EXT

2018-10-03 Thread Spencer E. Olson
Use new signal routing capability for all comedi command *_src == TRIG_EXT options. This new interface allows the user specify signals and terminals as TRIG_EXT sources using a very consistent naming convention. Furthermore, the interface allows backwards compatibility to prior behavior of specify

[PATCH v4 03/13] staging: comedi: add new device-global config interface

2018-10-03 Thread Spencer E. Olson
Adds interface for configuring options that are global to all sub-devices. For now, only options to configure device-globally identified signal routes have been defined. Signed-off-by: Spencer E. Olson --- drivers/staging/comedi/comedi.h | 18 drivers/staging/comedi/comedi_fops.c |

[PATCH v4 02/13] staging: comedi: add abstracted NI signal/terminal named constants

2018-10-03 Thread Spencer E. Olson
This change adds abstracted constants for National Instruments terminal/signal names. Some background: There have been significant confusions over the past many years for users when trying to understand how to connect to/from signals and terminals on NI hardware using comedi. The major reas

[PATCH v4 01/13] staging: comedi: tests: add unittest framework for comedi

2018-10-03 Thread Spencer E. Olson
Adds a framework for unittests for comedi drivers. It was certainly possible to write some unit tests before and test various aspects of a particular driver, but this framework makes this a bit easier and hopefully inspires more unittest modules to be written. Signed-off-by: Spencer E. Olson ---

[PATCH v4 00/13] device-global identifiers and routes introduced

2018-10-03 Thread Spencer E. Olson
This patch set is the second revision of a recent patch set of the same name. Changes and notes: - [PATCH v4 07/13]: Rebased patchset on repaired patch "staging: comedi: ni_mio_common: protect register write overflow" (that patch had a missing brace and this patch depends on that earlier

[PATCH v2] staging: comedi: ni_mio_common: protect register write overflow

2018-10-03 Thread Spencer E. Olson
Fixes two problems introduced as early as commit 03aef4b6dc12 ("Staging: comedi: add ni_mio_common code"): (1) Ensures that the last four bits of NISTC_RTSI_TRIGB_OUT_REG register is not unduly overwritten on e-series devices. On e-series devices, the first three of the last four bits are

[PATCH 1/3] staging: rtl8188eu: fix line over 80 characters - style

2018-10-03 Thread Michael Straube
Line break array declaration to clear a 'line over 80 characters' checkpatch warning. For consistency replace 0x0 with 0x00. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rt

[PATCH 3/3] staging: rtl8188eu: rewrite if tests - style

2018-10-03 Thread Michael Straube
Rewrite if tests to clear a 'line over 80 characters' and 'Comparisons should place the constant on the right side of the test' checkpatch warning. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH 2/3] staging: rtl8188eu: cleanup array declaration - style

2018-10-03 Thread Michael Straube
Cleanup array declaration to clear two 'line over 80 characters' checkpatch warnings and improve readability. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 32 --- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/drivers/staging

Re: staging: android: ion: aligned allocation support

2018-10-03 Thread Alexey Skidanov
On 10/03/2018 09:07 PM, Laura Abbott wrote: > On 10/02/2018 07:27 AM, Alexey Skidanov wrote: >> Hi, >> >> Sometimes HW requires memory buffer to be aligned in order to be used >> properly.  Of course, we may overcome the lack of aligned allocation >> support, but we may easily add it because CMA

Re: [patch 00/11] x86/vdso: Cleanups, simmplifications and CLOCK_TAI support\

2018-10-03 Thread Marcelo Tosatti
On Wed, Oct 03, 2018 at 04:00:29PM -0300, Marcelo Tosatti wrote: > On Tue, Oct 02, 2018 at 10:15:49PM -0700, Andy Lutomirski wrote: > > Hi Vitaly, Paolo, Radim, etc., > > > > On Fri, Sep 14, 2018 at 5:52 AM Thomas Gleixner wrote: > > > > > > Matt attempted to add CLOCK_TAI support to the VDSO clo

Re: [patch 00/11] x86/vdso: Cleanups, simmplifications and CLOCK_TAI support

2018-10-03 Thread Marcelo Tosatti
On Wed, Oct 03, 2018 at 11:22:58AM +0200, Vitaly Kuznetsov wrote: > Andy Lutomirski writes: > > > Hi Vitaly, Paolo, Radim, etc., > > > > On Fri, Sep 14, 2018 at 5:52 AM Thomas Gleixner wrote: > >> > >> Matt attempted to add CLOCK_TAI support to the VDSO clock_gettime() > >> implementation, which

Re: [patch 00/11] x86/vdso: Cleanups, simmplifications and CLOCK_TAI support

2018-10-03 Thread Marcelo Tosatti
On Tue, Oct 02, 2018 at 10:15:49PM -0700, Andy Lutomirski wrote: > Hi Vitaly, Paolo, Radim, etc., > > On Fri, Sep 14, 2018 at 5:52 AM Thomas Gleixner wrote: > > > > Matt attempted to add CLOCK_TAI support to the VDSO clock_gettime() > > implementation, which extended the clockid switch case and a

Re: [PATCH 1/6] Staging: rts5208: rtsx_card.c: Fixed all braces issues of the file

2018-10-03 Thread Greg KH
On Tue, Oct 02, 2018 at 07:11:26PM -0400, Maxime Desroches wrote: > Fixed all the braces issues of the rtsx_card.c file > > Signed-off-by: Maxime Desroches > --- > drivers/staging/rts5208/rtsx_card.c | 96 +++-- > 1 file changed, 37 insertions(+), 59 deletions(-) None of

Re: staging: android: ion: aligned allocation support

2018-10-03 Thread Laura Abbott
On 10/02/2018 07:27 AM, Alexey Skidanov wrote: Hi, Sometimes HW requires memory buffer to be aligned in order to be used properly. Of course, we may overcome the lack of aligned allocation support, but we may easily add it because CMA and gen_pool (used by several heaps) already support it. Do

Re: [PATCH v4] staging: android: ion: Add per-heap counters

2018-10-03 Thread Laura Abbott
On 09/30/2018 08:24 AM, Alexey Skidanov wrote: Heap statistics have been removed and currently even basics statistics are missing. This patch creates per heap debugfs directory /sys/kernel/debug/ and adds the following counters: - the number of allocated buffers; - the number of allocated bytes;

Re: [PATCH RFC] mm/memory_hotplug: Introduce memory block types

2018-10-03 Thread David Hildenbrand
On 03/10/2018 16:34, Vitaly Kuznetsov wrote: > Dave Hansen writes: > >> On 10/03/2018 06:52 AM, Vitaly Kuznetsov wrote: >>> It is more than just memmaps (e.g. forking udev process doing memory >>> onlining also needs memory) but yes, the main idea is to make the >>> onlining synchronous with hotp

Re: [PATCH RFC] mm/memory_hotplug: Introduce memory block types

2018-10-03 Thread David Hildenbrand
On 03/10/2018 16:24, Michal Hocko wrote: > On Wed 03-10-18 15:52:24, Vitaly Kuznetsov wrote: > [...] >>> As David said some of the memory cannot be onlined without further steps >>> (e.g. when it is standby as David called it) and then I fail to see how >>> eBPF help in any way. >> >> and also, we

Re: [PATCH RFC] mm/memory_hotplug: Introduce memory block types

2018-10-03 Thread David Hildenbrand
On 03/10/2018 15:54, Michal Hocko wrote: > On Tue 02-10-18 17:25:19, David Hildenbrand wrote: >> On 02/10/2018 15:47, Michal Hocko wrote: > [...] >>> Zone imbalance is an inherent problem of the highmem zone. It is >>> essentially the highmem zone we all loved so much back in 32b days. >>> Yes the

Re: [patch 00/11] x86/vdso: Cleanups, simmplifications and CLOCK_TAI support

2018-10-03 Thread Andy Lutomirski
On Wed, Oct 3, 2018 at 8:10 AM Thomas Gleixner wrote: > > On Wed, 3 Oct 2018, Andy Lutomirski wrote: > > > On Oct 3, 2018, at 5:01 AM, Vitaly Kuznetsov wrote: > > > Not all Hyper-V hosts support reenlightenment notifications (and, if I'm > > > not mistaken, you need to enable nesting for the VM t

Re: [PATCH v5 1/3] staging: mt7621-mmc: Remove #if 0 blocks

2018-10-03 Thread Nishad Kamdar
On Tue, Oct 02, 2018 at 03:16:36PM -0700, Greg Kroah-Hartman wrote: > On Mon, Oct 01, 2018 at 08:13:40PM +0530, Nishad Kamdar wrote: > > This patch removes #if 0 code blocks and usages of > > functions defined in the #if 0 blocks. > > > > Signed-off-by: Nishad Kamdar > > --- > > drivers/staging/

Re: [patch 00/11] x86/vdso: Cleanups, simmplifications and CLOCK_TAI support

2018-10-03 Thread Thomas Gleixner
On Wed, 3 Oct 2018, Andy Lutomirski wrote: > > On Oct 3, 2018, at 5:01 AM, Vitaly Kuznetsov wrote: > > Not all Hyper-V hosts support reenlightenment notifications (and, if I'm > > not mistaken, you need to enable nesting for the VM to get the feature - > > and most VMs don't have this) so I think

Re: [PATCH RFC] mm/memory_hotplug: Introduce memory block types

2018-10-03 Thread Vitaly Kuznetsov
Dave Hansen writes: > On 10/03/2018 06:52 AM, Vitaly Kuznetsov wrote: >> It is more than just memmaps (e.g. forking udev process doing memory >> onlining also needs memory) but yes, the main idea is to make the >> onlining synchronous with hotplug. > > That's a good theoretical concern. > > But,

Re: [PATCH RFC] mm/memory_hotplug: Introduce memory block types

2018-10-03 Thread Michal Hocko
On Wed 03-10-18 15:52:24, Vitaly Kuznetsov wrote: [...] > > As David said some of the memory cannot be onlined without further steps > > (e.g. when it is standby as David called it) and then I fail to see how > > eBPF help in any way. > > and also, we can fight till the end of days here trying to

Re: [patch 00/11] x86/vdso: Cleanups, simmplifications and CLOCK_TAI support

2018-10-03 Thread Andy Lutomirski
> On Oct 3, 2018, at 5:01 AM, Vitaly Kuznetsov wrote: > > Andy Lutomirski writes: > >>> On Oct 3, 2018, at 2:22 AM, Vitaly Kuznetsov wrote: >>> >>> Andy Lutomirski writes: >>> Hi Vitaly, Paolo, Radim, etc., >>> The notification you're talking about exists, it is called >>> Reen

[PATCH] staging: rtl8712: add SPDX identifiers

2018-10-03 Thread Michael Straube
This satisfies a checkpatch warning and is the preferred method for notating the license. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. Signed-off-by: Michael Straube --- drivers/staging/rtl8712/basic_types.h | 10 +-

Re: [PATCH RFC] mm/memory_hotplug: Introduce memory block types

2018-10-03 Thread Dave Hansen
On 10/03/2018 06:52 AM, Vitaly Kuznetsov wrote: > It is more than just memmaps (e.g. forking udev process doing memory > onlining also needs memory) but yes, the main idea is to make the > onlining synchronous with hotplug. That's a good theoretical concern. But, is it a problem we need to solve

Re: [PATCH RFC] mm/memory_hotplug: Introduce memory block types

2018-10-03 Thread Michal Hocko
On Tue 02-10-18 17:25:19, David Hildenbrand wrote: > On 02/10/2018 15:47, Michal Hocko wrote: [...] > > Zone imbalance is an inherent problem of the highmem zone. It is > > essentially the highmem zone we all loved so much back in 32b days. > > Yes the movable zone doesn't have any addressing limit

Re: [PATCH RFC] mm/memory_hotplug: Introduce memory block types

2018-10-03 Thread Vitaly Kuznetsov
Michal Hocko writes: > On Wed 03-10-18 15:38:04, Vitaly Kuznetsov wrote: >> David Hildenbrand writes: >> >> > On 02/10/2018 15:47, Michal Hocko wrote: >> ... >> >> >> >> Why do you need a generic hotplug rule in the first place? Why don't you >> >> simply provide different set of rules for dif

Re: [PATCH RFC] mm/memory_hotplug: Introduce memory block types

2018-10-03 Thread Michal Hocko
On Wed 03-10-18 15:38:04, Vitaly Kuznetsov wrote: > David Hildenbrand writes: > > > On 02/10/2018 15:47, Michal Hocko wrote: > ... > >> > >> Why do you need a generic hotplug rule in the first place? Why don't you > >> simply provide different set of rules for different usecases? Let users > >>

[PATCH v4] memory_hotplug: Free pages as higher order

2018-10-03 Thread Arun KS
When free pages are done with higher order, time spend on coalescing pages by buddy allocator can be reduced. With section size of 256MB, hot add latency of a single section shows improvement from 50-60 ms to less than 1 ms, hence improving the hot add latency by 60%. Modify external providers of o

Re: [PATCH RFC] mm/memory_hotplug: Introduce memory block types

2018-10-03 Thread Vitaly Kuznetsov
David Hildenbrand writes: > On 02/10/2018 15:47, Michal Hocko wrote: ... >> >> Why do you need a generic hotplug rule in the first place? Why don't you >> simply provide different set of rules for different usecases? Let users >> decide which usecase they prefer rather than try to be clever whic

Re: [PATCH 02/16] hv_balloon: Replace spin_is_locked() with lockdep

2018-10-03 Thread Vitaly Kuznetsov
Lance Roy writes: > lockdep_assert_held() is better suited to checking locking requirements, > since it won't get confused when someone else holds the lock. This is > also a step towards possibly removing spin_is_locked(). > > Signed-off-by: Lance Roy > Cc: "K. Y. Srinivasan" > Cc: Haiyang Zhan

Re: [PATCH] staging: comedi: ni_mio_common: protect register write overflow

2018-10-03 Thread Ian Abbott
On 03/10/2018 11:34, Ian Abbott wrote: On 03/10/18 02:24, Spencer Olson wrote: Should I resubmit this patch and the entire patch set from earlier today, each separately? The patch set from today titled "device-global identifiers and routes introduced" _does_ depend on this patch that was missin

Re: [patch 00/11] x86/vdso: Cleanups, simmplifications and CLOCK_TAI support

2018-10-03 Thread Vitaly Kuznetsov
Andy Lutomirski writes: >> On Oct 3, 2018, at 2:22 AM, Vitaly Kuznetsov wrote: >> >> Andy Lutomirski writes: >> >>> Hi Vitaly, Paolo, Radim, etc., >>> >> The notification you're talking about exists, it is called >> Reenligntenment, see 0092e4346f49 "x86/kvm: Support Hyper-V >> reenlightenme

Re: [PATCH] staging: comedi: ni_mio_common: protect register write overflow

2018-10-03 Thread Greg Kroah-Hartman
On Tue, Oct 02, 2018 at 07:24:32PM -0600, Spencer Olson wrote: > On Tue, Oct 2, 2018 at 6:16 PM Spencer Olson wrote: > > > > On Tue, Oct 2, 2018 at 11:32 AM Greg Kroah-Hartman > > wrote: > > > > > > On Wed, Sep 19, 2018 at 10:17:19AM -0600, Spencer E. Olson wrote: > > > > Fixes two problems intro

Re: [PATCH] staging: comedi: ni_mio_common: protect register write overflow

2018-10-03 Thread Ian Abbott
On 03/10/18 02:24, Spencer Olson wrote: On Tue, Oct 2, 2018 at 6:16 PM Spencer Olson wrote: On Tue, Oct 2, 2018 at 11:32 AM Greg Kroah-Hartman wrote: On Wed, Sep 19, 2018 at 10:17:19AM -0600, Spencer E. Olson wrote: [snip] diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/dri

Re: [patch 00/11] x86/vdso: Cleanups, simmplifications and CLOCK_TAI support

2018-10-03 Thread Andy Lutomirski
> On Oct 3, 2018, at 2:22 AM, Vitaly Kuznetsov wrote: > > Andy Lutomirski writes: > >> Hi Vitaly, Paolo, Radim, etc., >> >>> On Fri, Sep 14, 2018 at 5:52 AM Thomas Gleixner wrote: >>> >>> Matt attempted to add CLOCK_TAI support to the VDSO clock_gettime() >>> implementation, which extended

Re: [patch 00/11] x86/vdso: Cleanups, simmplifications and CLOCK_TAI support

2018-10-03 Thread Vitaly Kuznetsov
Andy Lutomirski writes: > Hi Vitaly, Paolo, Radim, etc., > > On Fri, Sep 14, 2018 at 5:52 AM Thomas Gleixner wrote: >> >> Matt attempted to add CLOCK_TAI support to the VDSO clock_gettime() >> implementation, which extended the clockid switch case and added yet >> another slightly different copy